rules.mak 795 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# Crypto++
CRYPTOPP_VERSION := 54557b18275053bbfc34594f7e65808dd92dd1a6
CRYPTOPP_URL := https://github.com/weidai11/cryptopp/archive/$(CRYPTOPP_VERSION).tar.gz

PKGS += cryptopp

ifeq ($(call need_pkg,'libcrypto++'),)
PKGS_FOUND += cryptopp
endif

CRYPTOPP_CMAKECONF := -DBUILD_TESTING=Off \
		-DBUILD_SHARED=Off \
		-DCMAKE_INSTALL_LIBDIR=lib

$(TARBALLS)/cryptopp-$(CRYPTOPP_VERSION).tar.gz:
	$(call download,$(CRYPTOPP_URL))

.sum-cryptopp: cryptopp-$(CRYPTOPP_VERSION).tar.gz

cryptopp: cryptopp-$(CRYPTOPP_VERSION).tar.gz .sum-cryptopp
	$(UNPACK)
ifdef HAVE_ANDROID
	$(APPLY_BIN) $(SRC)/cryptopp/cmake-crosscompile.patch
endif
	$(MOVE)

.cryptopp: cryptopp toolchain.cmake
	cd $< && rm GNUmakefile*
	cd $< && $(HOSTVARS) $(CMAKE) . $(CRYPTOPP_CMAKECONF)
	cd $< && $(MAKE) install
	touch $@