• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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.
20ifndef BOARD_WLAN_TI_STA_DK_ROOT
21  $(error BOARD_WLAN_TI_STA_DK_ROOT must be defined when including this makefile)
22endif
23ifeq ($(TARGET_SIMULATOR),true)
24  $(error This makefile must not be included when building the simulator)
25endif
26
27ifndef WPA_SUPPLICANT_VERSION
28WPA_SUPPLICANT_VERSION := VER_0_5_X
29endif
30
31ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
32WPA_SUPPL_DIR = external/wpa_supplicant
33else
34WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant
35endif
36WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)
37ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X)
38WPA_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
44endif
45
46DK_ROOT = $(BOARD_WLAN_TI_STA_DK_ROOT)
47OS_ROOT = $(DK_ROOT)/platforms
48STAD	= $(DK_ROOT)/stad
49UTILS	= $(DK_ROOT)/utils
50TWD	= $(DK_ROOT)/TWD
51COMMON  = $(DK_ROOT)/common
52TXN	= $(DK_ROOT)/Txn
53CUDK	= $(DK_ROOT)/CUDK
54LIB	= ../../lib
55
56include $(WPA_SUPPL_DIR)/.config
57
58INCLUDES = $(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
74L_CFLAGS = -DCONFIG_DRIVER_CUSTOM -DHOST_COMPILE -D__BYTE_ORDER_LITTLE_ENDIAN
75L_CFLAGS += -DWPA_SUPPLICANT_$(WPA_SUPPLICANT_VERSION)
76OBJS = driver_ti.c $(LIB)/scanmerge.c $(LIB)/shlist.c
77
78# To force sizeof(enum) = 4
79ifneq ($(TARGET_SIMULATOR),true)
80L_CFLAGS += -mabi=aapcs-linux
81endif
82
83ifdef CONFIG_NO_STDOUT_DEBUG
84L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
85endif
86
87ifdef CONFIG_DEBUG_FILE
88L_CFLAGS += -DCONFIG_DEBUG_FILE
89endif
90
91ifdef CONFIG_ANDROID_LOG
92L_CFLAGS += -DCONFIG_ANDROID_LOG
93endif
94
95ifdef CONFIG_IEEE8021X_EAPOL
96L_CFLAGS += -DIEEE8021X_EAPOL
97endif
98
99ifdef CONFIG_WPS
100L_CFLAGS += -DCONFIG_WPS
101endif
102
103########################
104
105include $(CLEAR_VARS)
106LOCAL_MODULE := libCustomWifi
107LOCAL_SHARED_LIBRARIES := libc libcutils
108LOCAL_CFLAGS := $(L_CFLAGS)
109LOCAL_SRC_FILES := $(OBJS)
110LOCAL_C_INCLUDES := $(INCLUDES)
111include $(BUILD_STATIC_LIBRARY)
112
113########################
114