xref: /freebsd/contrib/wpa/hs20/client/Android.mk (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1LOCAL_PATH := $(call my-dir)
2
3INCLUDES = $(LOCAL_PATH)
4INCLUDES += $(LOCAL_PATH)/../../src/utils
5INCLUDES += $(LOCAL_PATH)/../../src/common
6INCLUDES += $(LOCAL_PATH)/../../src
7INCLUDES += external/libxml2/include
8INCLUDES += external/curl/include
9INCLUDES += external/webkit/Source/WebKit/gtk
10
11# We try to keep this compiling against older platform versions.
12# The new icu location (external/icu) exports its own headers, but
13# the older versions in external/icu4c don't, and we need to add those
14# headers to the include path by hand.
15ifeq ($(wildcard external/icu),)
16INCLUDES += external/icu4c/common
17else
18# The LOCAL_EXPORT_C_INCLUDE_DIRS from ICU did not seem to fully resolve the
19# build (e.g., "mm -B" failed to build, but following that with "mm" allowed
20# the build to complete). For now, add the include directory manually here for
21# Android 5.0.
22ver = $(filter 5.0%,$(PLATFORM_VERSION))
23ifneq (,$(strip $(ver)))
24INCLUDES += external/icu/icu4c/source/common
25endif
26endif
27
28
29L_CFLAGS += -DCONFIG_CTRL_IFACE
30L_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
31L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
32
33OBJS = spp_client.c
34OBJS += oma_dm_client.c
35OBJS += osu_client.c
36OBJS += est.c
37OBJS += ../../src/common/wpa_ctrl.c
38OBJS += ../../src/common/wpa_helpers.c
39OBJS += ../../src/utils/xml-utils.c
40#OBJS += ../../src/utils/browser-android.c
41OBJS += ../../src/utils/browser-wpadebug.c
42OBJS += ../../src/utils/wpabuf.c
43OBJS += ../../src/utils/eloop.c
44OBJS += ../../src/wps/httpread.c
45OBJS += ../../src/wps/http_server.c
46OBJS += ../../src/utils/xml_libxml2.c
47OBJS += ../../src/utils/http_curl.c
48OBJS += ../../src/utils/base64.c
49OBJS += ../../src/utils/os_unix.c
50L_CFLAGS += -DCONFIG_DEBUG_FILE
51OBJS += ../../src/utils/wpa_debug.c
52OBJS += ../../src/utils/common.c
53OBJS += ../../src/crypto/crypto_internal.c
54OBJS += ../../src/crypto/md5-internal.c
55OBJS += ../../src/crypto/sha1-internal.c
56OBJS += ../../src/crypto/sha256-internal.c
57OBJS += ../../src/crypto/tls_openssl_ocsp.c
58
59L_CFLAGS += -DEAP_TLS_OPENSSL
60
61L_CFLAGS += -Wno-unused-parameter
62
63ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0)
64L_CFLAGS += -DCONFIG_ANDROID_LOG
65L_CFLAGS += -DANDROID_LOG_NAME='"hs20-osu-client"'
66endif
67
68########################
69include $(CLEAR_VARS)
70LOCAL_MODULE := hs20-osu-client
71LOCAL_MODULE_TAGS := optional
72
73LOCAL_SHARED_LIBRARIES := libc libcutils
74LOCAL_SHARED_LIBRARIES += libcrypto libssl
75ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0)
76LOCAL_VENDOR_MODULE := true
77LOCAL_SHARED_LIBRARIES += libxml2
78LOCAL_SHARED_LIBRARIES += liblog
79else
80#LOCAL_SHARED_LIBRARIES += libxml2
81LOCAL_STATIC_LIBRARIES += libxml2
82LOCAL_SHARED_LIBRARIES += libicuuc
83endif # End of check for platform version
84LOCAL_SHARED_LIBRARIES += libcurl
85
86LOCAL_CFLAGS := $(L_CFLAGS)
87LOCAL_SRC_FILES := $(OBJS)
88LOCAL_C_INCLUDES := $(INCLUDES)
89include $(BUILD_EXECUTABLE)
90
91########################
92