]>
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 \ | |
15 | $(LOCAL_PATH)/plugins/$(subst -,_,$(strip $(1)))/*.c \ | |
16 | ) \ | |
17 | ) \ | |
18 | ) | |
1be32988 TB |
19 | |
20 | # includes | |
551b0202 TB |
21 | strongswan_PATH := $(LOCAL_PATH) |
22 | libvstr_PATH := external/strongswan-support/vstr/include | |
23 | libgmp_PATH := external/strongswan-support/gmp | |
1be32988 TB |
24 | |
25 | # CFLAGS (partially from a configure run using droid-gcc) | |
26 | strongswan_CFLAGS := \ | |
27 | -Wno-format \ | |
28 | -Wno-pointer-sign \ | |
f9622e8c | 29 | -Wno-pointer-arith \ |
1be32988 TB |
30 | -Wno-sign-compare \ |
31 | -Wno-strict-aliasing \ | |
32 | -DHAVE___BOOL \ | |
33 | -DHAVE_STDBOOL_H \ | |
34 | -DHAVE_ALLOCA_H \ | |
35 | -DHAVE_ALLOCA \ | |
36 | -DHAVE_CLOCK_GETTIME \ | |
37 | -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \ | |
38 | -DHAVE_PRCTL \ | |
39 | -DHAVE_LINUX_UDP_H \ | |
40 | -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \ | |
41 | -DHAVE_IPSEC_MODE_BEET \ | |
42 | -DHAVE_IPSEC_DIR_FWD \ | |
43 | -DMONOLITHIC \ | |
44 | -DUSE_VSTR \ | |
45 | -DROUTING_TABLE=0 \ | |
46 | -DROUTING_TABLE_PRIO=220 \ | |
807c12ce | 47 | -DVERSION=\"@PACKAGE_VERSION@\" \ |
1be32988 TB |
48 | -DPLUGINS='"$(strongswan_PLUGINS)"' \ |
49 | -DIPSEC_DIR=\"/system/bin\" \ | |
50 | -DIPSEC_PIDDIR=\"/data/misc/vpn\" \ | |
51 | -DSTRONGSWAN_CONF=\"/system/etc/strongswan.conf\" \ | |
52 | -DDEV_RANDOM=\"/dev/random\" \ | |
53 | -DDEV_URANDOM=\"/dev/urandom\" | |
54 | ||
55 | # only for Android 2.0+ | |
56 | strongswan_CFLAGS += \ | |
57 | -DHAVE_IN6ADDR_ANY | |
58 | ||
59 | include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \ | |
60 | charon \ | |
52c72573 | 61 | libcharon \ |
1be32988 TB |
62 | libstrongswan \ |
63 | )) |