1 # 2 # Copyright (C) 2008 The Android Open Source Project 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # 16 LOCAL_PATH := $(call my-dir) 17 18 # This makefile is only included if BOARD_WLAN_TI_STA_DK_ROOT is set, 19 # and if we're not building for the simulator. 20 ifndef BOARD_WLAN_TI_STA_DK_ROOT 21 $(error BOARD_WLAN_TI_STA_DK_ROOT must be defined when including this makefile) 22 endif 23 ifeq ($(TARGET_SIMULATOR),true) 24 $(error This makefile must not be included when building the simulator) 25 endif 26 27 ifndef WPA_SUPPLICANT_VERSION 28 WPA_SUPPLICANT_VERSION := VER_0_5_X 29 endif 30 31 ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X) 32 WPA_SUPPL_DIR = external/wpa_supplicant 33 else 34 WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant 35 endif 36 WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR) 37 ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X) 38 WPA_SUPPL_DIR_INCLUDE += $(WPA_SUPPL_DIR)/src \ 39 $(WPA_SUPPL_DIR)/src/common \ 40 $(WPA_SUPPL_DIR)/src/drivers \ 41 $(WPA_SUPPL_DIR)/src/l2_packet \ 42 $(WPA_SUPPL_DIR)/src/utils \ 43 $(WPA_SUPPL_DIR)/src/wps 44 endif 45 46 DK_ROOT = $(BOARD_WLAN_TI_STA_DK_ROOT) 47 OS_ROOT = $(DK_ROOT)/platforms 48 STAD = $(DK_ROOT)/stad 49 UTILS = $(DK_ROOT)/utils 50 TWD = $(DK_ROOT)/TWD 51 COMMON = $(DK_ROOT)/common 52 TXN = $(DK_ROOT)/Txn 53 CUDK = $(DK_ROOT)/CUDK 54 LIB = ../../lib 55 56 include $(WPA_SUPPL_DIR)/.config 57 58 INCLUDES = $(STAD)/Export_Inc \ 59 $(STAD)/src/Application \ 60 $(UTILS) \ 61 $(OS_ROOT)/os/linux/inc \ 62 $(OS_ROOT)/os/common/inc \ 63 $(TWD)/TWDriver \ 64 $(TWD)/FirmwareApi \ 65 $(TWD)/TwIf \ 66 $(TWD)/FW_Transfer/Export_Inc \ 67 $(TXN) \ 68 $(CUDK)/configurationutility/inc \ 69 $(CUDK)/os/common/inc \ 70 external/openssl/include \ 71 $(WPA_SUPPL_DIR_INCLUDE) \ 72 $(DK_ROOT)/../lib 73 74 L_CFLAGS = -DCONFIG_DRIVER_CUSTOM -DHOST_COMPILE -D__BYTE_ORDER_LITTLE_ENDIAN 75 L_CFLAGS += -DWPA_SUPPLICANT_$(WPA_SUPPLICANT_VERSION) 76 OBJS = driver_ti.c $(LIB)/scanmerge.c $(LIB)/shlist.c 77 78 # To force sizeof(enum) = 4 79 ifneq ($(TARGET_SIMULATOR),true) 80 L_CFLAGS += -mabi=aapcs-linux 81 endif 82 83 ifdef CONFIG_NO_STDOUT_DEBUG 84 L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG 85 endif 86 87 ifdef CONFIG_DEBUG_FILE 88 L_CFLAGS += -DCONFIG_DEBUG_FILE 89 endif 90 91 ifdef CONFIG_ANDROID_LOG 92 L_CFLAGS += -DCONFIG_ANDROID_LOG 93 endif 94 95 ifdef CONFIG_IEEE8021X_EAPOL 96 L_CFLAGS += -DIEEE8021X_EAPOL 97 endif 98 99 ifdef CONFIG_WPS 100 L_CFLAGS += -DCONFIG_WPS 101 endif 102 103 ######################## 104 105 include $(CLEAR_VARS) 106 LOCAL_MODULE := libCustomWifi 107 LOCAL_SHARED_LIBRARIES := libc libcutils 108 LOCAL_CFLAGS := $(L_CFLAGS) 109 LOCAL_SRC_FILES := $(OBJS) 110 LOCAL_C_INCLUDES := $(INCLUDES) 111 include $(BUILD_STATIC_LIBRARY) 112 113 ######################## 114