]>
Commit | Line | Data |
---|---|---|
1be32988 TB |
1 | LOCAL_PATH := $(call my-dir) |
2 | include $(CLEAR_VARS) | |
3 | ||
4 | # this is the list of plugins that are built into libstrongswan and charon | |
5 | # also these plugins are loaded by default (if not changed in strongswan.conf) | |
5430d6ab | 6 | strongswan_PLUGINS := openssl fips-prf random pubkey pkcs1 \ |
c177076b | 7 | pem xcbc hmac kernel-netlink socket-default android \ |
635724f6 | 8 | stroke eap-identity eap-mschapv2 eap-md5 |
1be32988 TB |
9 | |
10 | # helper macros to only add source files for plugins included in the list above | |
0f5a0439 | 11 | # source files are relative to the android.mk that called the macro |
1be32988 TB |
12 | plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS)) |
13 | add_plugin = $(if $(call plugin_enabled,$(1)), \ | |
0f5a0439 TB |
14 | $(patsubst $(LOCAL_PATH)/%,%, \ |
15 | $(wildcard \ | |
e3dd6b14 TB |
16 | $(subst %,$(subst -,_,$(strip $(1))), \ |
17 | $(LOCAL_PATH)/plugins/%/%*.c \ | |
18 | ) \ | |
0f5a0439 TB |
19 | ) \ |
20 | ) \ | |
21 | ) | |
1be32988 TB |
22 | |
23 | # includes | |
551b0202 TB |
24 | strongswan_PATH := $(LOCAL_PATH) |
25 | libvstr_PATH := external/strongswan-support/vstr/include | |
26 | libgmp_PATH := external/strongswan-support/gmp | |
1be32988 | 27 | |
eae49aff TB |
28 | # some definitions |
29 | strongswan_VERSION := "@PACKAGE_VERSION@" | |
30 | strongswan_DIR := "/system/bin" | |
31 | strongswan_SBINDIR := "/system/bin" | |
32 | strongswan_PIDDIR := "/data/misc/vpn" | |
33 | strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec" | |
34 | strongswan_CONFDIR := "/system/etc" | |
35 | strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf" | |
36 | ||
1be32988 TB |
37 | # CFLAGS (partially from a configure run using droid-gcc) |
38 | strongswan_CFLAGS := \ | |
39 | -Wno-format \ | |
40 | -Wno-pointer-sign \ | |
f9622e8c | 41 | -Wno-pointer-arith \ |
1be32988 TB |
42 | -Wno-sign-compare \ |
43 | -Wno-strict-aliasing \ | |
44 | -DHAVE___BOOL \ | |
45 | -DHAVE_STDBOOL_H \ | |
46 | -DHAVE_ALLOCA_H \ | |
47 | -DHAVE_ALLOCA \ | |
48 | -DHAVE_CLOCK_GETTIME \ | |
49 | -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \ | |
50 | -DHAVE_PRCTL \ | |
51 | -DHAVE_LINUX_UDP_H \ | |
52 | -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \ | |
53 | -DHAVE_IPSEC_MODE_BEET \ | |
54 | -DHAVE_IPSEC_DIR_FWD \ | |
61c950d9 TB |
55 | -DOPENSSL_NO_EC \ |
56 | -DOPENSSL_NO_ECDSA \ | |
57 | -DOPENSSL_NO_ECDH \ | |
58 | -DOPENSSL_NO_ENGINE \ | |
946be4d3 TB |
59 | -DCAPABILITIES \ |
60 | -DCAPABILITIES_NATIVE \ | |
1be32988 TB |
61 | -DMONOLITHIC \ |
62 | -DUSE_VSTR \ | |
63 | -DROUTING_TABLE=0 \ | |
64 | -DROUTING_TABLE_PRIO=220 \ | |
eae49aff | 65 | -DVERSION=\"$(strongswan_VERSION)\" \ |
1be32988 | 66 | -DPLUGINS='"$(strongswan_PLUGINS)"' \ |
eae49aff TB |
67 | -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \ |
68 | -DIPSEC_DIR=\"$(strongswan_DIR)\" \ | |
69 | -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \ | |
70 | -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \ | |
71 | -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \ | |
1be32988 TB |
72 | -DDEV_RANDOM=\"/dev/random\" \ |
73 | -DDEV_URANDOM=\"/dev/urandom\" | |
74 | ||
75 | # only for Android 2.0+ | |
76 | strongswan_CFLAGS += \ | |
77 | -DHAVE_IN6ADDR_ANY | |
78 | ||
79 | include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \ | |
80 | charon \ | |
52c72573 | 81 | libcharon \ |
6edbe165 | 82 | libhydra \ |
1be32988 | 83 | libstrongswan \ |
aeb6590b | 84 | libtncif \ |
dcd9970d | 85 | libfreeswan \ |
b3b1419e | 86 | stroke \ |
1be32988 | 87 | )) |