1LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4STATIC_LIB ?= y
5DEBUG ?= y
6HOST_PLATFORM ?= wipp
7
8WILINK_ROOT = ../..
9CUDK_ROOT = $(WILINK_ROOT)/CUDK
10
11ifeq ($(DEBUG),y)
12  DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin   # "-O" is needed to expand inlines
13#  DEBUGFLAGS+= -DDEBUG_MESSAGES
14else
15  DEBUGFLAGS = -O2
16endif
17
18COMMON  = $(WILINK_ROOT)/stad
19
20ARMFLAGS  = -fno-common -g -fno-builtin -Wall #-pipe
21
22LOCAL_C_INCLUDES = \
23	$(LOCAL_PATH)/$(CUDK_ROOT)/os/common/inc \
24	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/common/inc \
25	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/linux/inc \
26	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/Export_Inc \
27	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Sta_Management \
28	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Connection_Managment \
29	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Application \
30	$(LOCAL_PATH)/$(WILINK_ROOT)/utils \
31	$(LOCAL_PATH)/$(WILINK_ROOT)/Txn \
32	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TWDriver \
33	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \
34	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
35	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TwIf \
36	$(LOCAL_PATH)/$(CUDK_ROOT)/os/linux/inc \
37	$(LOCAL_PATH)/$(KERNEL_DIR)/include 
38
39LOCAL_SRC_FILES:= \
40	tiwlan_loader.c
41
42LOCAL_CFLAGS+= -Wall -Wstrict-prototypes $(DEBUGFLAGS) -D__LINUX__ $(DK_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN -DDRV_NAME='"tiwlan"'
43
44LOCAL_CFLAGS += $(ARMFLAGS)
45
46LOCAL_LDLIBS += -lpthread
47
48LOCAL_STATIC_LIBRARIES := \
49	libtiOsLib
50
51LOCAL_SHARED_LIBRARIES := \
52	libc libcutils libhardware_legacy
53
54LOCAL_MODULE:= wlan_loader
55
56include $(BUILD_EXECUTABLE)
57
58