]>
Commit | Line | Data |
---|---|---|
1 | LOCAL_PATH := $(call my-dir) | |
2 | include $(CLEAR_VARS) | |
3 | ||
4 | # the executables that should be installed on the final system have to be added | |
5 | # to PRODUCT_PACKAGES in | |
6 | # build/target/product/core.mk | |
7 | # possible executables are | |
8 | # starter - allows to control and configure the daemon from the command line | |
9 | # charon - the IKE daemon | |
10 | ||
11 | # if you enable starter (see above) uncomment the following line | |
12 | # strongswan_BUILD_STARTER := true | |
13 | ||
14 | # this is the list of plugins that are built into libstrongswan and charon | |
15 | # also these plugins are loaded by default (if not changed in strongswan.conf) | |
16 | strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \ | |
17 | pkcs1 pkcs8 pem xcbc hmac kdf kernel-netlink socket-default android-dns \ | |
18 | stroke eap-identity eap-mschapv2 eap-md5 eap-gtc | |
19 | ||
20 | # list of all plugins - used to enable them with the function below | |
21 | strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS)) | |
22 | ||
23 | include $(LOCAL_PATH)/Android.common.mk | |
24 | ||
25 | # includes | |
26 | strongswan_PATH := $(LOCAL_PATH) | |
27 | libcurl_PATH := external/strongswan-support/libcurl/include | |
28 | libgmp_PATH := external/strongswan-support/gmp | |
29 | openssl_PATH := external/openssl/include | |
30 | ||
31 | # some definitions | |
32 | strongswan_DIR := "/system/bin" | |
33 | strongswan_SBINDIR := "/system/bin" | |
34 | strongswan_PIDDIR := "/data/misc/vpn" | |
35 | strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec" | |
36 | strongswan_CONFDIR := "/system/etc" | |
37 | strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf" | |
38 | ||
39 | # CFLAGS (partially from a configure run using droid-gcc) | |
40 | strongswan_CFLAGS := \ | |
41 | -Wno-format \ | |
42 | -Wno-pointer-sign \ | |
43 | -Wno-pointer-arith \ | |
44 | -Wno-sign-compare \ | |
45 | -Wno-strict-aliasing \ | |
46 | -DHAVE___BOOL \ | |
47 | -DHAVE_STDBOOL_H \ | |
48 | -DHAVE_ALLOCA_H \ | |
49 | -DHAVE_ALLOCA \ | |
50 | -DHAVE_CLOCK_GETTIME \ | |
51 | -DHAVE_DLADDR \ | |
52 | -DHAVE_PRCTL \ | |
53 | -DHAVE_LINUX_UDP_H \ | |
54 | -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \ | |
55 | -DHAVE_IPSEC_MODE_BEET \ | |
56 | -DHAVE_IPSEC_DIR_FWD \ | |
57 | -DOPENSSL_NO_ENGINE \ | |
58 | -DCONFIG_H_INCLUDED \ | |
59 | -DCAPABILITIES \ | |
60 | -DCAPABILITIES_NATIVE \ | |
61 | -DMONOLITHIC \ | |
62 | -DUSE_IKEV1 \ | |
63 | -DUSE_IKEV2 \ | |
64 | -DUSE_BUILTIN_PRINTF \ | |
65 | -DDEBUG \ | |
66 | -DROUTING_TABLE=0 \ | |
67 | -DROUTING_TABLE_PRIO=220 \ | |
68 | -DVERSION=\"$(strongswan_VERSION)\" \ | |
69 | -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \ | |
70 | -DIPSEC_DIR=\"$(strongswan_DIR)\" \ | |
71 | -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \ | |
72 | -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \ | |
73 | -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \ | |
74 | -DDEV_RANDOM=\"/dev/random\" \ | |
75 | -DDEV_URANDOM=\"/dev/urandom\" | |
76 | ||
77 | # only for Android 2.0+ | |
78 | strongswan_CFLAGS += \ | |
79 | -DHAVE_IN6ADDR_ANY | |
80 | ||
81 | strongswan_BUILD := \ | |
82 | charon \ | |
83 | libcharon \ | |
84 | libstrongswan \ | |
85 | libtncif \ | |
86 | libtnccs \ | |
87 | libimcv \ | |
88 | libtpmtss | |
89 | ||
90 | ifneq ($(strongswan_BUILD_STARTER),) | |
91 | strongswan_BUILD += \ | |
92 | starter \ | |
93 | stroke \ | |
94 | ipsec | |
95 | endif | |
96 | ||
97 | include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \ | |
98 | $(sort $(strongswan_BUILD)))) |