1 # 2 # Build options 3 # 4 # compiling the OAL as static lib 5 STATIC_LIB ?= y 6 # compiling in debug mode 7 DEBUG ?= y 8 # build the supplicant 9 BUILD_SUPPL ?= y 10 # type of supplicant to build 11 # WPA = Point to TI's supplicant 12 # ANDROID = Will point to Android's supplicant 13 SUPPL?=ANDROID 14 # enable WPA enterprise authorization modes 15 WPA_ENTERPRISE ?= y 16 # add XCC support 17 XCC ?= n 18 19 # 20 # Directories and files 21 # 22 WILINK_ROOT = .. 23 CUDK_ROOT ?= $(WILINK_ROOT)/CUDK 24 CU_DIR = $(CUDK_ROOT)/configurationutility 25 26 LOGGER_DIR = $(CUDK_ROOT)/logger/linux 27 OUTPUT_DIR ?= $(CUDK_ROOT)/output 28 TI_OS_LIB_DIR=$(CUDK_ROOT)/os/linux/src 29 ifeq ($(STATIC_LIB),y) 30 TI_OS_LIB = tiOsLib.a 31 else 32 TI_OS_LIB = tiOsLib.so 33 endif 34 WLAN_LOADER_DIR = $(CUDK_ROOT)/tiwlan_loader/ 35 36 37 # 38 # Targets 39 # 40 CU_TARGET = $(OUTPUT_DIR)/wlan_cu 41 OS_TARGET = $(OUTPUT_DIR)/$(TI_OS_LIB) 42 LOADER_TARGET = $(OUTPUT_DIR)/tiwlan_loader 43 ALL_TARGETS = $(OS_TARGET) $(LOADER_TARGET) $(CU_TARGET) 44 #Supplicant directory, file and target 45 46 ifeq ($(SUPPL),WPA) 47 SUPPL_TARGET = $(OUTPUT_DIR)/wpa_supplicant 48 TI_SUPP_LIB_DIR = $(CUDK_ROOT)/wpa_suppl 49 ifeq ($(BUILD_SUPPL),y) 50 ALL_TARGETS += $(SUPPL_TARGET) 51 endif 52 endif 53 54 ifeq ($(SUPPL),DEVICESCAPE) 55 SUPPL_TARGET = $(OUTPUT_DIR)/wpa_supplicant 56 TI_SUPP_LIB_DIR = $(CUDK_ROOT)/devicescape-dsa-XCC-wps-2.0.1-008 57 ifeq ($(BUILD_SUPPL),y) 58 ALL_TARGETS += $(SUPPL_TARGET) 59 endif 60 endif 61 62 ifeq ($(SUPPL),ANDROID) 63 TI_SUPP_LIB_DIR = $(CUDK_ROOT)/../../../../../external/wpa_supplicant 64 endif 65 66 .PHONY: all 67 all: $(ALL_TARGETS) 68 69 .PHONY: $(SUPPL_TARGET) 70 $(SUPPL_TARGET): 71 ifeq ($(SUPPL),DEVICESCAPE) 72 $(MAKE) -e -C $(TI_SUPP_LIB_DIR) DEBUG=$(DEBUG) XCC=$(XCC) CROSS_COMPILE=$(CROSS_COMPILE) STATIC_LIB=$(STATIC_LIB) TI_WLAN_DRIVER=y CONFIG_CTRL_IFACE=unix 73 else 74 $(MAKE) -e -C $(TI_SUPP_LIB_DIR) DEBUG=$(DEBUG) XCC=$(XCC) CROSS_COMPILE=$(CROSS_COMPILE) STATIC_LIB=$(STATIC_LIB) TI_WLAN_DRIVER=y CONFIG_CTRL_IFACE=unix CONFIG_EAP_WSC=y CONFIG_WPS=y 75 76 endif 77 $(CROSS_COMPILE)strip -s $(TI_SUPP_LIB_DIR)/wpa_supplicant 78 cp -f $(TI_SUPP_LIB_DIR)/wpa_supplicant $(OUTPUT_DIR) 79 80 .PHONY: $(OS_TARGET) 81 $(OS_TARGET): 82 @echo ALL_TARGETS=$(ALL_TARGETS) 83 @echo SUPPL=$(SUPPL) 84 @echo BUILD_SUPPL=$(BUILD_SUPPL) 85 $(MAKE) -C $(TI_OS_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) STATIC_LIB=$(STATIC_LIB) XCC=$(XCC) WPA_ENTERPRISE=$(WPA_ENTERPRISE) SUPPL=$(SUPPL) BUILD_SUPPL=$(BUILD_SUPPL) TI_SUPP_LIB_DIR=$(TI_SUPP_LIB_DIR) 86 87 .PHONY: $(CU_TARGET) 88 $(CU_TARGET): 89 $(MAKE) -C $(CU_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) STATIC_LIB=$(STATIC_LIB) XCC=$(XCC) WPA_ENTERPRISE=$(WPA_ENTERPRISE) SUPPL=$(SUPPL) BUILD_SUPPL=$(BUILD_SUPPL) TI_SUPP_LIB_DIR=$(TI_SUPP_LIB_DIR) 90 91 .PHONY: $(LOADER_TARGET) 92 $(LOADER_TARGET): 93 $(MAKE) -C $(WLAN_LOADER_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) STATIC_LIB=$(STATIC_LIB) 94 95 .PHONY: clean 96 clean: 97 $(MAKE) -C $(CU_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) XCC=$(XCC) clean 98 $(MAKE) -C $(TI_OS_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) XCC=$(XCC) clean 99 $(MAKE) -C $(WLAN_LOADER_DIR) CROSS_COMPILE=$(CROSS_COMPILE) clean 100 ifeq ($(BUILD_SUPPL), y) 101 $(MAKE) -e -C $(TI_SUPP_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) clean 102 endif 103 ifeq ($(SUPPL), WPA) 104 rm -f $(OUTPUT_DIR)/wpa_supplicant 105 $(MAKE) -C $(TI_SUPP_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) XCC=$(XCC) clean 106 endif 107 108 109 ifeq ($(ETH_SUPPORT), y) 110 DK_DEFINES += -D ETH_SUPPORT 111 endif 112