blob: be6c3e84eb5b75a7316ca80cc527894175850a5c [file] [log] [blame]
Simao Gomes Viana64e1d062016-08-20 16:43:22 +02001ifneq ($(TARGET_HAS_IPA_IN_DEVTREE),true)
Ravinder Konkacb36a6c2015-03-30 19:25:25 +05302BOARD_PLATFORM_LIST := msm8916
3BOARD_PLATFORM_LIST += msm8909
4ifneq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true)
Skylar Changa1d886d2014-06-23 11:49:56 -07005ifneq (,$(filter $(QCOM_BOARD_PLATFORMS),$(TARGET_BOARD_PLATFORM)))
6ifneq (, $(filter aarch64 arm arm64, $(TARGET_ARCH)))
7
8LOCAL_PATH := $(call my-dir)
9
10include $(CLEAR_VARS)
11
12LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
13LOCAL_C_INCLUDES += $(LOCAL_PATH)/../inc
14LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ipanat/inc
Shruthi Krishna8bff7032014-11-03 22:54:51 -080015ifeq ($(call is-platform-sdk-version-at-least,20),true)
16LOCAL_C_INCLUDES += external/icu/icu4c/source/common
17else
Skylar Changa1d886d2014-06-23 11:49:56 -070018LOCAL_C_INCLUDES += external/icu4c/common
Shruthi Krishna8bff7032014-11-03 22:54:51 -080019endif
Skylar Changa1d886d2014-06-23 11:49:56 -070020LOCAL_C_INCLUDES += external/dhcpcd
Skylar Changa1d886d2014-06-23 11:49:56 -070021LOCAL_C_INCLUDES += external/libxml2/include
22LOCAL_C_INCLUDES += external/libnetfilter_conntrack/include
23LOCAL_C_INCLUDES += external/libnfnetlink/include
24
25LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
26LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
27
28
29LOCAL_CFLAGS := -v
30LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID
Ravinder Konka75da2ca2015-09-03 18:29:14 +053031ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
Skylar Changa1d886d2014-06-23 11:49:56 -070032LOCAL_CFLAGS += -DDEBUG
Ravinder Konka75da2ca2015-09-03 18:29:14 +053033endif
Skylar Changff639a22015-10-14 20:02:01 -070034
Skylar Changba6fe112016-04-28 12:50:44 -070035ifeq ($(TARGET_BOARD_PLATFORM),msmcobalt)
Skylar Changff639a22015-10-14 20:02:01 -070036LOCAL_CFLAGS += -DFEATURE_IPA_V3
37endif
38
Skylar Chang61061e12015-02-04 17:55:00 -080039filetoadd = bionic/libc/kernel/arch-arm/asm/posix_types.h
40LOCAL_CFLAGS += $(shell if [ -a $(filetoadd) ] ; then echo -include $(filetoadd) ; fi ;)
41filetoadd = bionic/libc/kernel/arch-arm/asm/byteorder.h
42LOCAL_CFLAGS += $(shell if [ -a $(filetoadd) ] ; then echo -include $(filetoadd) ; fi ;)
Skylar Changa1d886d2014-06-23 11:49:56 -070043
44LOCAL_SRC_FILES := IPACM_Main.cpp \
45 IPACM_EvtDispatcher.cpp \
46 IPACM_Config.cpp \
47 IPACM_CmdQueue.cpp \
48 IPACM_Filtering.cpp \
49 IPACM_Routing.cpp \
50 IPACM_Header.cpp \
51 IPACM_Lan.cpp \
52 IPACM_Iface.cpp \
53 IPACM_Wlan.cpp \
54 IPACM_Wan.cpp \
55 IPACM_IfaceManager.cpp \
56 IPACM_Neighbor.cpp \
57 IPACM_Netlink.cpp \
58 IPACM_Xml.cpp \
59 IPACM_Conntrack_NATApp.cpp\
60 IPACM_ConntrackClient.cpp \
61 IPACM_ConntrackListener.cpp \
62 IPACM_Log.cpp
63
64LOCAL_MODULE := ipacm
Aravind Asamb06d13d2015-09-23 16:32:24 -070065LOCAL_CLANG := false
Skylar Chang2912b252015-02-02 23:28:07 -080066LOCAL_MODULE_TAGS := optional
Skylar Changa1d886d2014-06-23 11:49:56 -070067
68LOCAL_SHARED_LIBRARIES := libipanat
69LOCAL_SHARED_LIBRARIES += libxml2
70LOCAL_SHARED_LIBRARIES += libnfnetlink
71LOCAL_SHARED_LIBRARIES += libnetfilter_conntrack
Skylar Changa1d886d2014-06-23 11:49:56 -070072LOCAL_SHARED_LIBRARIES += libdhcpcd
Skylar Chang92815092016-03-13 23:59:26 -070073LOCAL_CLANG := true
Skylar Changa1d886d2014-06-23 11:49:56 -070074include $(BUILD_EXECUTABLE)
75
76################################################################################
77
78define ADD_TEST
79
80include $(CLEAR_VARS)
81LOCAL_MODULE := $1
82LOCAL_SRC_FILES := $1
83LOCAL_MODULE_CLASS := ipacm
84LOCAL_MODULE_TAGS := debug
85LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
86include $(BUILD_PREBUILT)
87
88endef
89
Skylar Chang14ccbc52015-02-12 23:37:50 -080090include $(CLEAR_VARS)
91LOCAL_MODULE := IPACM_cfg.xml
92LOCAL_MODULE_CLASS := ETC
93LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
94LOCAL_MODULE_TAGS := optional
95LOCAL_SRC_FILES := $(LOCAL_MODULE)
96LOCAL_MODULE_OWNER := ipacm
97include $(BUILD_PREBUILT)
Skylar Changa1d886d2014-06-23 11:49:56 -070098
Skylar Changa1d886d2014-06-23 11:49:56 -070099endif # $(TARGET_ARCH)
100endif
Linux Build Service Account5cbcdf92015-10-02 04:16:28 -0700101endif
Simao Gomes Viana64e1d062016-08-20 16:43:22 +0200102endif # $(TARGET_HAS_IPA_IN_DEVTREE)