• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4STATIC_LIB ?= y
5DEBUG ?= y
6BUILD_SUPPL ?= n
7WPA_ENTERPRISE ?= y
8
9ifeq ($(DEBUG),y)
10  DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin
11else
12  DEBUGFLAGS = -O2
13endif
14
15WILINK_ROOT = ../../../..
16CUDK_ROOT = $(WILINK_ROOT)/CUDK
17ifndef WPA_SUPPLICANT_VERSION
18WPA_SUPPLICANT_VERSION := VER_0_5_X
19endif
20
21ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
22WPA_SUPPL_DIR = external/wpa_supplicant
23else
24WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant
25endif
26WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)
27ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X)
28WPA_SUPPL_DIR_INCLUDE += $(WPA_SUPPL_DIR)/src \
29	$(WPA_SUPPL_DIR)/src/common \
30	$(WPA_SUPPL_DIR)/src/drivers \
31	$(WPA_SUPPL_DIR)/src/l2_packet \
32	$(WPA_SUPPL_DIR)/src/utils \
33	$(WPA_SUPPL_DIR)/src/wps
34endif
35
36DK_DEFINES =
37ifeq ($(WPA_ENTERPRISE), y)
38DK_DEFINES += -D WPA_ENTERPRISE
39endif
40
41ifeq ($(BUILD_SUPPL), y)
42DK_DEFINES += -D WPA_SUPPLICANT -D CONFIG_CTRL_IFACE -D CONFIG_CTRL_IFACE_UNIX
43-include $(WPA_SUPPL_DIR)/.config
44ifdef CONFIG_WPS
45DK_DEFINES += -DCONFIG_WPS
46endif
47endif
48
49LOCAL_CFLAGS += \
50	-Wall -Wstrict-prototypes $(DEBUGFLAGS) -D__LINUX__ $(DK_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN -fno-common #-pipe
51
52LOCAL_SRC_FILES:= \
53	cu_wext.c \
54	ipc_sta.c \
55	ipc_event.c \
56	ipc_wpa.c \
57	os_trans.c \
58	ParsEvent.c \
59	osapi.c
60
61ifeq ($(BUILD_SUPPL), y)
62	ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
63	LOCAL_SRC_FILES += $(WPA_SUPPL_DIR)/wpa_ctrl.c
64	else
65	LOCAL_SRC_FILES += $(WPA_SUPPL_DIR)/common/src/wpa_ctrl.c
66	endif
67endif
68
69LOCAL_C_INCLUDES := \
70	$(LOCAL_PATH)/../inc \
71	$(LOCAL_PATH)/../../common/inc \
72	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/Export_Inc \
73	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Sta_Management \
74	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Application \
75	$(LOCAL_PATH)/$(WILINK_ROOT)/utils \
76	$(LOCAL_PATH)/$(WILINK_ROOT)/Txn \
77	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TWDriver \
78	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \
79	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
80	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TwIf \
81	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/linux/inc \
82	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/common/inc \
83	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \
84	$(LOCAL_PATH)/$(CUDK_ROOT)/configurationutility/inc \
85	$(WPA_SUPPL_DIR_INCLUDE)
86
87LOCAL_MODULE := libtiOsLib
88
89include $(BUILD_STATIC_LIBRARY)
90