xref: /OK3568_Linux_fs/buildroot/package/botan/botan.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# botan
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunBOTAN_VERSION = 2.18.2
8*4882a593SmuzhiyunBOTAN_SOURCE = Botan-$(BOTAN_VERSION).tar.xz
9*4882a593SmuzhiyunBOTAN_SITE = http://botan.randombit.net/releases
10*4882a593SmuzhiyunBOTAN_LICENSE = BSD-2-Clause
11*4882a593SmuzhiyunBOTAN_LICENSE_FILES = license.txt
12*4882a593SmuzhiyunBOTAN_CPE_ID_VENDOR = botan_project
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunBOTAN_INSTALL_STAGING = YES
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunBOTAN_CONF_OPTS = \
17*4882a593Smuzhiyun	--cpu=$(BR2_ARCH) \
18*4882a593Smuzhiyun	--os=linux \
19*4882a593Smuzhiyun	--cc=gcc \
20*4882a593Smuzhiyun	--cc-bin="$(TARGET_CXX)" \
21*4882a593Smuzhiyun	--prefix=/usr \
22*4882a593Smuzhiyun	--without-documentation
23*4882a593Smuzhiyun
24*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
25*4882a593SmuzhiyunBOTAN_CONF_OPTS += --extra-libs=atomic
26*4882a593Smuzhiyunendif
27*4882a593Smuzhiyun
28*4882a593Smuzhiyunifeq ($(BR2_SHARED_LIBS),y)
29*4882a593SmuzhiyunBOTAN_CONF_OPTS += \
30*4882a593Smuzhiyun	--disable-static-library \
31*4882a593Smuzhiyun	--enable-shared-library
32*4882a593Smuzhiyunelse ifeq ($(BR2_STATIC_LIBS),y)
33*4882a593SmuzhiyunBOTAN_CONF_OPTS += \
34*4882a593Smuzhiyun	--disable-shared-library \
35*4882a593Smuzhiyun	--enable-static-library \
36*4882a593Smuzhiyun	--no-autoload
37*4882a593Smuzhiyunelse ifeq ($(BR2_SHARED_STATIC_LIBS),y)
38*4882a593SmuzhiyunBOTAN_CONF_OPTS += \
39*4882a593Smuzhiyun	--enable-shared-library \
40*4882a593Smuzhiyun	--enable-static-library
41*4882a593Smuzhiyunendif
42*4882a593Smuzhiyun
43*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
44*4882a593SmuzhiyunBOTAN_CONF_OPTS += --with-stack-protector
45*4882a593Smuzhiyunelse
46*4882a593SmuzhiyunBOTAN_CONF_OPTS += --without-stack-protector
47*4882a593Smuzhiyunendif
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
50*4882a593SmuzhiyunBOTAN_CONF_OPTS += --without-os-feature=getauxval
51*4882a593Smuzhiyunendif
52*4882a593Smuzhiyun
53*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_BOOST_FILESYSTEM)$(BR2_PACKAGE_BOOST_SYSTEM),yy)
54*4882a593SmuzhiyunBOTAN_DEPENDENCIES += boost
55*4882a593SmuzhiyunBOTAN_CONF_OPTS += --with-boost
56*4882a593Smuzhiyunendif
57*4882a593Smuzhiyun
58*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_BZIP2),y)
59*4882a593SmuzhiyunBOTAN_DEPENDENCIES += bzip2
60*4882a593SmuzhiyunBOTAN_CONF_OPTS += --with-bzip2
61*4882a593Smuzhiyunendif
62*4882a593Smuzhiyun
63*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_OPENSSL),y)
64*4882a593SmuzhiyunBOTAN_DEPENDENCIES += openssl
65*4882a593SmuzhiyunBOTAN_CONF_OPTS += --with-openssl
66*4882a593Smuzhiyunendif
67*4882a593Smuzhiyun
68*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_SQLITE),y)
69*4882a593SmuzhiyunBOTAN_DEPENDENCIES += sqlite
70*4882a593SmuzhiyunBOTAN_CONF_OPTS += --with-sqlite
71*4882a593Smuzhiyunendif
72*4882a593Smuzhiyun
73*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_XZ),y)
74*4882a593SmuzhiyunBOTAN_DEPENDENCIES += xz
75*4882a593SmuzhiyunBOTAN_CONF_OPTS += --with-lzma
76*4882a593Smuzhiyunendif
77*4882a593Smuzhiyun
78*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ZLIB),y)
79*4882a593SmuzhiyunBOTAN_DEPENDENCIES += zlib
80*4882a593SmuzhiyunBOTAN_CONF_OPTS += --with-zlib
81*4882a593Smuzhiyunendif
82*4882a593Smuzhiyun
83*4882a593Smuzhiyunifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
84*4882a593SmuzhiyunBOTAN_CONF_OPTS += --disable-altivec
85*4882a593Smuzhiyunendif
86*4882a593Smuzhiyun
87*4882a593Smuzhiyunifeq ($(BR2_ARM_CPU_HAS_NEON),)
88*4882a593SmuzhiyunBOTAN_CONF_OPTS += --disable-neon
89*4882a593Smuzhiyunendif
90*4882a593Smuzhiyun
91*4882a593Smuzhiyundefine BOTAN_CONFIGURE_CMDS
92*4882a593Smuzhiyun	(cd $(@D); $(TARGET_MAKE_ENV) ./configure.py $(BOTAN_CONF_OPTS))
93*4882a593Smuzhiyunendef
94*4882a593Smuzhiyun
95*4882a593Smuzhiyundefine BOTAN_BUILD_CMDS
96*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) AR="$(TARGET_AR)"
97*4882a593Smuzhiyunendef
98*4882a593Smuzhiyun
99*4882a593Smuzhiyundefine BOTAN_INSTALL_STAGING_CMDS
100*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
101*4882a593Smuzhiyunendef
102*4882a593Smuzhiyun
103*4882a593Smuzhiyundefine BOTAN_INSTALL_TARGET_CMDS
104*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
105*4882a593Smuzhiyunendef
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun$(eval $(generic-package))
108