Home | History | Annotate | Download | only in wpa_supplicant_lib
      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 ifeq ($(TARGET_SIMULATOR),true)
     19   $(error This makefile must not be included when building the simulator)
     20 endif
     21 
     22 ifndef WPA_SUPPLICANT_VERSION
     23 WPA_SUPPLICANT_VERSION := VER_0_5_X
     24 endif
     25 
     26 ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
     27 WPA_SUPPL_DIR = external/wpa_supplicant
     28 else
     29 WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant
     30 endif
     31 WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)
     32 ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X)
     33 WPA_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
     39 endif
     40 
     41 DK_ROOT = hardware/ti/wlan/$(BOARD_WLAN_DEVICE)
     42 OS_ROOT = $(DK_ROOT)/platforms
     43 STAD	= $(DK_ROOT)/stad
     44 UTILS	= $(DK_ROOT)/utils
     45 TWD	= $(DK_ROOT)/TWD
     46 COMMON  = $(DK_ROOT)/common
     47 TXN	= $(DK_ROOT)/Txn
     48 CUDK	= $(DK_ROOT)/CUDK
     49 LIB	= ../../lib
     50 
     51 include $(WPA_SUPPL_DIR)/.config
     52 
     53 INCLUDES = $(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   
     69 L_CFLAGS = -DCONFIG_DRIVER_CUSTOM -DHOST_COMPILE -D__BYTE_ORDER_LITTLE_ENDIAN
     70 L_CFLAGS += -DWPA_SUPPLICANT_$(WPA_SUPPLICANT_VERSION)
     71 OBJS = driver_ti.c $(LIB)/scanmerge.c $(LIB)/shlist.c
     72 
     73 # To force sizeof(enum) = 4
     74 ifneq ($(TARGET_SIMULATOR),true)
     75 L_CFLAGS += -mabi=aapcs-linux
     76 endif
     77 
     78 ifdef CONFIG_NO_STDOUT_DEBUG
     79 L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
     80 endif
     81 
     82 ifdef CONFIG_DEBUG_FILE
     83 L_CFLAGS += -DCONFIG_DEBUG_FILE
     84 endif
     85 
     86 ifdef CONFIG_ANDROID_LOG
     87 L_CFLAGS += -DCONFIG_ANDROID_LOG
     88 endif
     89 
     90 ifdef CONFIG_IEEE8021X_EAPOL
     91 L_CFLAGS += -DIEEE8021X_EAPOL
     92 endif
     93 
     94 ifdef CONFIG_WPS
     95 L_CFLAGS += -DCONFIG_WPS
     96 endif
     97 
     98 ########################
     99  
    100 include $(CLEAR_VARS)
    101 LOCAL_MODULE := libCustomWifi
    102 LOCAL_SHARED_LIBRARIES := libc libcutils
    103 LOCAL_CFLAGS := $(L_CFLAGS)
    104 LOCAL_SRC_FILES := $(OBJS)
    105 LOCAL_C_INCLUDES := $(INCLUDES)
    106 include $(BUILD_STATIC_LIBRARY)
    107 
    108 ########################
    109