]>
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) | |
b73b3a03 TB |
6 | strongswan_PLUGINS := openssl fips-prf random x509 pubkey pkcs1 \ |
7 | pem xcbc hmac kernel-netlink socket-default android | |
1be32988 TB |
8 | |
9 | # helper macros to only add source files for plugins included in the list above | |
0f5a0439 | 10 | # source files are relative to the android.mk that called the macro |
1be32988 TB |
11 | plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS)) |
12 | add_plugin = $(if $(call plugin_enabled,$(1)), \ | |
0f5a0439 TB |
13 | $(patsubst $(LOCAL_PATH)/%,%, \ |
14 | $(wildcard \ | |
e3dd6b14 TB |
15 | $(subst %,$(subst -,_,$(strip $(1))), \ |
16 | $(LOCAL_PATH)/plugins/%/%*.c \ | |
17 | ) \ | |
0f5a0439 TB |
18 | ) \ |
19 | ) \ | |
20 | ) | |
1be32988 TB |
21 | |
22 | # includes | |
551b0202 TB |
23 | strongswan_PATH := $(LOCAL_PATH) |
24 | libvstr_PATH := external/strongswan-support/vstr/include | |
25 | libgmp_PATH := external/strongswan-support/gmp | |
1be32988 TB |
26 | |
27 | # CFLAGS (partially from a configure run using droid-gcc) | |
28 | strongswan_CFLAGS := \ | |
29 | -Wno-format \ | |
30 | -Wno-pointer-sign \ | |
f9622e8c | 31 | -Wno-pointer-arith \ |
1be32988 TB |
32 | -Wno-sign-compare \ |
33 | -Wno-strict-aliasing \ | |
34 | -DHAVE___BOOL \ | |
35 | -DHAVE_STDBOOL_H \ | |
36 | -DHAVE_ALLOCA_H \ | |
37 | -DHAVE_ALLOCA \ | |
38 | -DHAVE_CLOCK_GETTIME \ | |
39 | -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \ | |
40 | -DHAVE_PRCTL \ | |
41 | -DHAVE_LINUX_UDP_H \ | |
42 | -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \ | |
43 | -DHAVE_IPSEC_MODE_BEET \ | |
44 | -DHAVE_IPSEC_DIR_FWD \ | |
45 | -DMONOLITHIC \ | |
46 | -DUSE_VSTR \ | |
47 | -DROUTING_TABLE=0 \ | |
48 | -DROUTING_TABLE_PRIO=220 \ | |
807c12ce | 49 | -DVERSION=\"@PACKAGE_VERSION@\" \ |
1be32988 TB |
50 | -DPLUGINS='"$(strongswan_PLUGINS)"' \ |
51 | -DIPSEC_DIR=\"/system/bin\" \ | |
52 | -DIPSEC_PIDDIR=\"/data/misc/vpn\" \ | |
53 | -DSTRONGSWAN_CONF=\"/system/etc/strongswan.conf\" \ | |
54 | -DDEV_RANDOM=\"/dev/random\" \ | |
55 | -DDEV_URANDOM=\"/dev/urandom\" | |
56 | ||
57 | # only for Android 2.0+ | |
58 | strongswan_CFLAGS += \ | |
59 | -DHAVE_IN6ADDR_ANY | |
60 | ||
61 | include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \ | |
62 | charon \ | |
52c72573 | 63 | libcharon \ |
6edbe165 | 64 | libhydra \ |
1be32988 TB |
65 | libstrongswan \ |
66 | )) |