aboutsummaryrefslogtreecommitdiffstats
path: root/src/frontends/android/jni/Android.mk
blob: ce544d2c3f114b5c0889c989a764b0859f9ab14e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
	pkcs1 pkcs8 pem xcbc hmac socket-default \
	eap-identity eap-mschapv2 eap-md5 eap-gtc

strongswan_PLUGINS := $(strongswan_CHARON_PLUGINS)

include $(LOCAL_PATH)/strongswan/Android.common.mk

# includes
strongswan_PATH := $(LOCAL_PATH)/strongswan
libvstr_PATH := $(LOCAL_PATH)/vstr/include
openssl_PATH := $(LOCAL_PATH)/openssl/include

# CFLAGS (partially from a configure run using droid-gcc)
strongswan_CFLAGS := \
	-Wall \
	-Wextra \
	-Wno-format \
	-Wno-pointer-sign \
	-Wno-pointer-arith \
	-Wno-sign-compare \
	-Wno-strict-aliasing \
	-Wno-unused-parameter \
	-DHAVE___BOOL \
	-DHAVE_STDBOOL_H \
	-DHAVE_ALLOCA_H \
	-DHAVE_ALLOCA \
	-DHAVE_CLOCK_GETTIME \
	-DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
	-DHAVE_PRCTL \
	-DHAVE_LINUX_UDP_H \
	-DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
	-DHAVE_IPSEC_MODE_BEET \
	-DHAVE_IPSEC_DIR_FWD \
	-DOPENSSL_NO_CMS \
	-DOPENSSL_NO_ENGINE \
	-DCONFIG_H_INCLUDED \
	-DCAPABILITIES \
	-DCAPABILITIES_NATIVE \
	-DMONOLITHIC \
	-DUSE_IKEV1 \
	-DUSE_IKEV2 \
	-DUSE_VSTR \
	-DDEBUG \
	-DCHARON_UDP_PORT=0 \
	-DCHARON_NATT_PORT=0 \
	-DVERSION=\"$(strongswan_VERSION)\" \
	-DDEV_RANDOM=\"/dev/random\" \
	-DDEV_URANDOM=\"/dev/urandom\"

# only for Android 2.0+
strongswan_CFLAGS += \
	-DHAVE_IN6ADDR_ANY

include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
		vstr \
		openssl \
		libandroidbridge \
		strongswan/src/libipsec \
		strongswan/src/libcharon \
		strongswan/src/libhydra \
		strongswan/src/libstrongswan \
))