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# 16LOCAL_PATH := $(call my-dir) 17 18ifeq ($(TARGET_SIMULATOR),true) 19 $(error This makefile must not be included when building the simulator) 20endif 21 22ifndef WPA_SUPPLICANT_VERSION 23WPA_SUPPLICANT_VERSION := VER_0_5_X 24endif 25 26ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X) 27WPA_SUPPL_DIR = external/wpa_supplicant 28else 29WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant 30endif 31WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR) 32ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X) 33WPA_SUPPL_DIR_INCLUDE += $(WPA_SUPPL_DIR)/src \ 34 $(WPA_SUPPL_DIR)/src/common \ 35 $(WPA_SUPPL_DIR)/src/drivers \ 36 $(WPA_SUPPL_DIR)/src/l2_packet \ 37 $(WPA_SUPPL_DIR)/src/utils \ 38 $(WPA_SUPPL_DIR)/src/wps 39endif 40 41DK_ROOT = hardware/ti/wlan/$(BOARD_WLAN_DEVICE) 42OS_ROOT = $(DK_ROOT)/platforms 43STAD = $(DK_ROOT)/stad 44UTILS = $(DK_ROOT)/utils 45TWD = $(DK_ROOT)/TWD 46COMMON = $(DK_ROOT)/common 47TXN = $(DK_ROOT)/Txn 48CUDK = $(DK_ROOT)/CUDK 49LIB = ../../lib 50 51include $(WPA_SUPPL_DIR)/.config 52 53INCLUDES = $(STAD)/Export_Inc \ 54 $(STAD)/src/Application \ 55 $(UTILS) \ 56 $(OS_ROOT)/os/linux/inc \ 57 $(OS_ROOT)/os/common/inc \ 58 $(TWD)/TWDriver \ 59 $(TWD)/FirmwareApi \ 60 $(TWD)/TwIf \ 61 $(TWD)/FW_Transfer/Export_Inc \ 62 $(TXN) \ 63 $(CUDK)/configurationutility/inc \ 64 $(CUDK)/os/common/inc \ 65 external/openssl/include \ 66 $(WPA_SUPPL_DIR_INCLUDE) \ 67 $(DK_ROOT)/../lib 68 69L_CFLAGS = -DCONFIG_DRIVER_CUSTOM -DHOST_COMPILE -D__BYTE_ORDER_LITTLE_ENDIAN 70L_CFLAGS += -DWPA_SUPPLICANT_$(WPA_SUPPLICANT_VERSION) 71OBJS = driver_ti.c $(LIB)/scanmerge.c $(LIB)/shlist.c 72 73# To force sizeof(enum) = 4 74ifneq ($(TARGET_SIMULATOR),true) 75L_CFLAGS += -mabi=aapcs-linux 76endif 77 78ifdef CONFIG_NO_STDOUT_DEBUG 79L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG 80endif 81 82ifdef CONFIG_DEBUG_FILE 83L_CFLAGS += -DCONFIG_DEBUG_FILE 84endif 85 86ifdef CONFIG_ANDROID_LOG 87L_CFLAGS += -DCONFIG_ANDROID_LOG 88endif 89 90ifdef CONFIG_IEEE8021X_EAPOL 91L_CFLAGS += -DIEEE8021X_EAPOL 92endif 93 94ifdef CONFIG_WPS 95L_CFLAGS += -DCONFIG_WPS 96endif 97 98######################## 99 100include $(CLEAR_VARS) 101LOCAL_MODULE := libCustomWifi 102LOCAL_SHARED_LIBRARIES := libc libcutils 103LOCAL_CFLAGS := $(L_CFLAGS) 104LOCAL_SRC_FILES := $(OBJS) 105LOCAL_C_INCLUDES := $(INCLUDES) 106include $(BUILD_STATIC_LIBRARY) 107 108######################## 109