011_botan.mk 729 B

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