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 ($(WPA_SUPPLICANT_VERSION),VER_0_8_X) 19 20 ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),) 21 CONFIG_DRIVER_$(BOARD_WPA_SUPPLICANT_DRIVER) := y 22 endif 23 24 # Use a custom libnl on releases before N 25 ifeq (0, $(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?)) 26 EXTERNAL_GCE_LIBNL_INCLUDE := external/gce/libnl/include 27 else 28 EXTERNAL_GCE_LIBNL_INCLUDE := 29 endif 30 31 32 WPA_SUPPL_DIR = external/wpa_supplicant_8 33 WPA_SRC_FILE := 34 35 include $(WPA_SUPPL_DIR)/wpa_supplicant/android.config 36 37 WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)/src \ 38 $(WPA_SUPPL_DIR)/src/common \ 39 $(WPA_SUPPL_DIR)/src/drivers \ 40 $(WPA_SUPPL_DIR)/src/l2_packet \ 41 $(WPA_SUPPL_DIR)/src/utils \ 42 $(WPA_SUPPL_DIR)/src/wps \ 43 $(WPA_SUPPL_DIR)/wpa_supplicant \ 44 $(EXTERNAL_GCE_LIBNL_INCLUDE) 45 46 WPA_SUPPL_DIR_INCLUDE += external/libnl/include 47 48 ifdef CONFIG_DRIVER_NL80211 49 WPA_SRC_FILE += driver_cmd_nl80211.c 50 endif 51 52 ifeq ($(TARGET_ARCH),arm) 53 # To force sizeof(enum) = 4 54 L_CFLAGS += -mabi=aapcs-linux 55 endif 56 57 ifdef CONFIG_ANDROID_LOG 58 L_CFLAGS += -DCONFIG_ANDROID_LOG 59 endif 60 61 ######################## 62 63 include $(CLEAR_VARS) 64 LOCAL_MODULE := lib_driver_cmd_simulated 65 LOCAL_VENDOR_MODULE := true 66 LOCAL_SHARED_LIBRARIES := libc libcutils liblog 67 LOCAL_HEADER_LIBRARIES := libcutils_headers 68 69 LOCAL_CFLAGS := $(L_CFLAGS) \ 70 $(GCE_VERSION_CFLAGS) 71 72 LOCAL_SRC_FILES := $(WPA_SRC_FILE) 73 74 LOCAL_C_INCLUDES := \ 75 device/google/gce/include \ 76 $(WPA_SUPPL_DIR_INCLUDE)\ 77 78 include $(BUILD_STATIC_LIBRARY) 79 80 ######################## 81 82 endif 83