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