Add documentation for signature hash algorithm enforcing to man ipsec.conf
[strongswan.git] / Android.mk.in
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 daemons from the command line
9 # charon - the IKE daemon
10
11 # if you enable starter (see above) uncomment this line too
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 := openssl fips-prf random pubkey pkcs1 \
17 pem xcbc hmac kernel-netlink socket-default android \
18 stroke eap-identity eap-mschapv2 eap-md5
19
20 strongswan_STARTER_PLUGINS := kernel-netlink
21
22 # list of all plugins - used to enable them with the function below
23 strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
24 $(strongswan_STARTER_PLUGINS))
25
26 # helper macros to only add source files for plugins included in the list above
27 # source files are relative to the android.mk that called the macro
28 plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS))
29 add_plugin = $(if $(call plugin_enabled,$(1)), \
30 $(patsubst $(LOCAL_PATH)/%,%, \
31 $(wildcard \
32 $(subst %,$(subst -,_,$(strip $(1))), \
33 $(LOCAL_PATH)/plugins/%/%*.c \
34 ) \
35 ) \
36 ) \
37 )
38
39 # includes
40 strongswan_PATH := $(LOCAL_PATH)
41 libvstr_PATH := external/strongswan-support/vstr/include
42 libgmp_PATH := external/strongswan-support/gmp
43
44 # some definitions
45 strongswan_VERSION := "@PACKAGE_VERSION@"
46 strongswan_DIR := "/system/bin"
47 strongswan_SBINDIR := "/system/bin"
48 strongswan_PIDDIR := "/data/misc/vpn"
49 strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
50 strongswan_CONFDIR := "/system/etc"
51 strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
52
53 # CFLAGS (partially from a configure run using droid-gcc)
54 strongswan_CFLAGS := \
55 -Wno-format \
56 -Wno-pointer-sign \
57 -Wno-pointer-arith \
58 -Wno-sign-compare \
59 -Wno-strict-aliasing \
60 -DHAVE___BOOL \
61 -DHAVE_STDBOOL_H \
62 -DHAVE_ALLOCA_H \
63 -DHAVE_ALLOCA \
64 -DHAVE_CLOCK_GETTIME \
65 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
66 -DHAVE_PRCTL \
67 -DHAVE_LINUX_UDP_H \
68 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
69 -DHAVE_IPSEC_MODE_BEET \
70 -DHAVE_IPSEC_DIR_FWD \
71 -DOPENSSL_NO_EC \
72 -DOPENSSL_NO_ECDSA \
73 -DOPENSSL_NO_ECDH \
74 -DOPENSSL_NO_ENGINE \
75 -DCAPABILITIES \
76 -DCAPABILITIES_NATIVE \
77 -DMONOLITHIC \
78 -DUSE_IKEV2 \
79 -DUSE_VSTR \
80 -DDEBUG \
81 -DROUTING_TABLE=0 \
82 -DROUTING_TABLE_PRIO=220 \
83 -DVERSION=\"$(strongswan_VERSION)\" \
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)\" \
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
96 strongswan_BUILD := \
97 charon \
98 libcharon \
99 libhydra \
100 libstrongswan \
101 libtncif \
102 libtnccs
103
104 ifneq ($(strongswan_BUILD_STARTER),)
105 strongswan_BUILD += \
106 starter \
107 stroke \
108 ipsec
109 endif
110
111 include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
112 $(sort $(strongswan_BUILD))))