1fb233b48896a21b401c578047abf5304de9ea28
[strongswan.git] / src / frontends / android / app / src / main / jni / Android.mk
1 LOCAL_PATH := $(call my-dir)
2 include $(CLEAR_VARS)
3
4 # use "bring your own device" (BYOD) features (also see USE_BYOD in
5 # MainActivity.java)
6 strongswan_USE_BYOD := true
7
8 strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
9 pkcs1 pkcs8 pem xcbc hmac socket-default \
10 eap-identity eap-mschapv2 eap-md5 eap-gtc eap-tls
11
12 ifneq ($(strongswan_USE_BYOD),)
13 strongswan_BYOD_PLUGINS := eap-ttls eap-tnc tnc-imc tnc-tnccs tnccs-20
14 endif
15
16 strongswan_PLUGINS := $(strongswan_CHARON_PLUGINS) \
17 $(strongswan_BYOD_PLUGINS)
18
19 include $(LOCAL_PATH)/strongswan/Android.common.mk
20
21 # includes
22 strongswan_PATH := $(LOCAL_PATH)/strongswan
23 openssl_PATH := $(LOCAL_PATH)/openssl/include
24
25 # CFLAGS (partially from a configure run using droid-gcc)
26 strongswan_CFLAGS := \
27 -Wall \
28 -Wextra \
29 -Wno-format \
30 -Wno-pointer-sign \
31 -Wno-pointer-arith \
32 -Wno-sign-compare \
33 -Wno-strict-aliasing \
34 -Wno-unused-parameter \
35 -DHAVE___BOOL \
36 -DHAVE_STDBOOL_H \
37 -DHAVE_ALLOCA_H \
38 -DHAVE_ALLOCA \
39 -DHAVE_CLOCK_GETTIME \
40 -DHAVE_DLADDR \
41 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
42 -DHAVE_PRCTL \
43 -DHAVE_LINUX_UDP_H \
44 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
45 -DHAVE_IPSEC_MODE_BEET \
46 -DHAVE_IPSEC_DIR_FWD \
47 -DHAVE_IN6ADDR_ANY \
48 -DHAVE_NETINET_IP6_H \
49 -DOPENSSL_NO_ENGINE \
50 -DCONFIG_H_INCLUDED \
51 -DCAPABILITIES \
52 -DCAPABILITIES_NATIVE \
53 -DMONOLITHIC \
54 -DUSE_IKEV1 \
55 -DUSE_IKEV2 \
56 -DUSE_BUILTIN_PRINTF \
57 -DDEBUG \
58 -DCHARON_UDP_PORT=0 \
59 -DCHARON_NATT_PORT=0 \
60 -DVERSION=\"$(strongswan_VERSION)\" \
61 -DDEV_RANDOM=\"/dev/random\" \
62 -DDEV_URANDOM=\"/dev/urandom\"
63
64 ifneq ($(strongswan_USE_BYOD),)
65 strongswan_CFLAGS += -DUSE_BYOD
66 endif
67
68 strongswan_BUILD := \
69 openssl \
70 libandroidbridge \
71 strongswan/src/libipsec \
72 strongswan/src/libcharon \
73 strongswan/src/libhydra \
74 strongswan/src/libstrongswan
75
76 ifneq ($(strongswan_USE_BYOD),)
77 strongswan_BUILD += \
78 strongswan/src/libtnccs \
79 strongswan/src/libtncif \
80 strongswan/src/libimcv
81 endif
82
83 include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
84 $(strongswan_BUILD)))