]>
Commit | Line | Data |
---|---|---|
1be32988 TB |
1 | LOCAL_PATH := $(call my-dir) |
2 | include $(CLEAR_VARS) | |
3 | ||
2e0b478a TB |
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 | |
67307ad7 | 8 | # starter - allows to control and configure the daemon from the command line |
fff4b74d | 9 | # charon - the IKE daemon |
67307ad7 | 10 | # scepclient - SCEP client |
1cde0a51 | 11 | |
67307ad7 TB |
12 | # if you enable starter or scepclient (see above) uncomment the proper |
13 | # lines here | |
2e0b478a | 14 | # strongswan_BUILD_STARTER := true |
67307ad7 | 15 | # strongswan_BUILD_SCEPCLIENT := true |
0ad58f01 | 16 | |
1be32988 TB |
17 | # this is the list of plugins that are built into libstrongswan and charon |
18 | # also these plugins are loaded by default (if not changed in strongswan.conf) | |
162621ed | 19 | strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \ |
9804fcce | 20 | pkcs1 pkcs8 pem xcbc hmac kernel-netlink socket-default android-dns \ |
ef73bb52 | 21 | stroke eap-identity eap-mschapv2 eap-md5 eap-gtc |
1be32988 | 22 | |
67307ad7 TB |
23 | ifneq ($(strongswan_BUILD_SCEPCLIENT),) |
24 | # plugins loaded by scepclient | |
36f2e11c | 25 | strongswan_SCEPCLIENT_PLUGINS := openssl curl fips-prf random pkcs1 pkcs7 pem |
67307ad7 TB |
26 | endif |
27 | ||
bb3357e8 TB |
28 | strongswan_STARTER_PLUGINS := kernel-netlink |
29 | ||
9227a3b3 TB |
30 | # list of all plugins - used to enable them with the function below |
31 | strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \ | |
67307ad7 TB |
32 | $(strongswan_STARTER_PLUGINS) \ |
33 | $(strongswan_SCEPCLIENT_PLUGINS)) | |
9227a3b3 | 34 | |
3fa8d773 | 35 | include $(LOCAL_PATH)/Android.common.mk |
1be32988 TB |
36 | |
37 | # includes | |
551b0202 | 38 | strongswan_PATH := $(LOCAL_PATH) |
197dbf5f | 39 | libcurl_PATH := external/strongswan-support/libcurl/include |
551b0202 | 40 | libgmp_PATH := external/strongswan-support/gmp |
73940eb7 | 41 | openssl_PATH := external/openssl/include |
1be32988 | 42 | |
eae49aff | 43 | # some definitions |
eae49aff TB |
44 | strongswan_DIR := "/system/bin" |
45 | strongswan_SBINDIR := "/system/bin" | |
46 | strongswan_PIDDIR := "/data/misc/vpn" | |
47 | strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec" | |
48 | strongswan_CONFDIR := "/system/etc" | |
49 | strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf" | |
50 | ||
1be32988 TB |
51 | # CFLAGS (partially from a configure run using droid-gcc) |
52 | strongswan_CFLAGS := \ | |
53 | -Wno-format \ | |
54 | -Wno-pointer-sign \ | |
f9622e8c | 55 | -Wno-pointer-arith \ |
1be32988 TB |
56 | -Wno-sign-compare \ |
57 | -Wno-strict-aliasing \ | |
58 | -DHAVE___BOOL \ | |
59 | -DHAVE_STDBOOL_H \ | |
60 | -DHAVE_ALLOCA_H \ | |
61 | -DHAVE_ALLOCA \ | |
62 | -DHAVE_CLOCK_GETTIME \ | |
63 | -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \ | |
64 | -DHAVE_PRCTL \ | |
65 | -DHAVE_LINUX_UDP_H \ | |
66 | -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \ | |
67 | -DHAVE_IPSEC_MODE_BEET \ | |
68 | -DHAVE_IPSEC_DIR_FWD \ | |
61c950d9 TB |
69 | -DOPENSSL_NO_EC \ |
70 | -DOPENSSL_NO_ECDSA \ | |
71 | -DOPENSSL_NO_ECDH \ | |
72 | -DOPENSSL_NO_ENGINE \ | |
980ca1f7 | 73 | -DCONFIG_H_INCLUDED \ |
946be4d3 TB |
74 | -DCAPABILITIES \ |
75 | -DCAPABILITIES_NATIVE \ | |
1be32988 | 76 | -DMONOLITHIC \ |
9866c26c | 77 | -DUSE_IKEV1 \ |
088020fb | 78 | -DUSE_IKEV2 \ |
20c99eda | 79 | -DUSE_BUILTIN_PRINTF \ |
b66a3b3d | 80 | -DDEBUG \ |
1be32988 TB |
81 | -DROUTING_TABLE=0 \ |
82 | -DROUTING_TABLE_PRIO=220 \ | |
eae49aff | 83 | -DVERSION=\"$(strongswan_VERSION)\" \ |
eae49aff TB |
84 | -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \ |
85 | -DIPSEC_DIR=\"$(strongswan_DIR)\" \ | |
86 | -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \ | |
87 | -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \ | |
88 | -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \ | |
1be32988 TB |
89 | -DDEV_RANDOM=\"/dev/random\" \ |
90 | -DDEV_URANDOM=\"/dev/urandom\" | |
91 | ||
92 | # only for Android 2.0+ | |
93 | strongswan_CFLAGS += \ | |
94 | -DHAVE_IN6ADDR_ANY | |
95 | ||
1cde0a51 TB |
96 | strongswan_BUILD := \ |
97 | charon \ | |
98 | libcharon \ | |
99 | libhydra \ | |
100 | libstrongswan \ | |
ba5b559b | 101 | libtncif \ |
19737434 TB |
102 | libtnccs \ |
103 | libimcv | |
1cde0a51 TB |
104 | |
105 | ifneq ($(strongswan_BUILD_STARTER),) | |
106 | strongswan_BUILD += \ | |
1cde0a51 TB |
107 | starter \ |
108 | stroke \ | |
109 | ipsec | |
110 | endif | |
111 | ||
67307ad7 TB |
112 | ifneq ($(strongswan_BUILD_SCEPCLIENT),) |
113 | strongswan_BUILD += \ | |
114 | scepclient | |
115 | endif | |
116 | ||
1be32988 | 117 | include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \ |
1cde0a51 | 118 | $(sort $(strongswan_BUILD)))) |