]>
Commit | Line | Data |
---|---|---|
a5c682e8 TB |
1 | #!/usr/bin/make |
2 | ||
3 | PKG = botan | |
4 | SRC = https://github.com/randombit/$(PKG).git | |
6639288b | 5 | REV = 2.9.0 |
a5c682e8 TB |
6 | |
7 | NUM_CPUS := $(shell getconf _NPROCESSORS_ONLN) | |
8 | ||
9 | # the first two are necessary due to LD, the others to reduce the build time | |
10 | CONFIG_OPTS = \ | |
11 | --without-os-features=threads \ | |
12 | --disable-modules=locking_allocator \ | |
13 | --disable-modules=pkcs11,tls,x509,xmss \ | |
14 | ||
15 | all: install | |
16 | ||
67fd36e8 TB |
17 | .$(PKG)-cloned: |
18 | [ -d $(PKG) ] || git clone $(SRC) $(PKG) | |
19 | @touch $@ | |
a5c682e8 | 20 | |
67fd36e8 | 21 | .$(PKG)-checkout-$(REV): .$(PKG)-cloned |
a5c682e8 TB |
22 | cd $(PKG) && git fetch && git checkout $(REV) |
23 | @touch $@ | |
24 | ||
67fd36e8 | 25 | .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) |
a5c682e8 TB |
26 | cd $(PKG) && python ./configure.py $(CONFIG_OPTS) && make -j $(NUM_CPUS) |
27 | @touch $@ | |
28 | ||
29 | install: .$(PKG)-built-$(REV) | |
30 | cd $(PKG) && make install && ldconfig |