Home | History | Annotate | Download | only in service
      1 # Copyright (C) 2011 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 ifneq ($(TARGET_BUILD_PDK), true)
     18 
     19 # Make HAL stub library
     20 # ============================================================
     21 
     22 include $(CLEAR_VARS)
     23 
     24 LOCAL_REQUIRED_MODULES :=
     25 
     26 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast
     27 LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses
     28 LOCAL_CPPFLAGS += -Wno-conversion-null
     29 
     30 LOCAL_C_INCLUDES += \
     31 	external/libnl-headers \
     32 	$(call include-path-for, libhardware_legacy)/hardware_legacy
     33 
     34 LOCAL_SRC_FILES := \
     35 	lib/wifi_hal.cpp
     36 
     37 LOCAL_MODULE := libwifi-hal
     38 
     39 include $(BUILD_STATIC_LIBRARY)
     40 
     41 # set correct hal library path
     42 # ============================================================
     43 LIB_WIFI_HAL := libwifi-hal
     44 
     45 ifeq ($(BOARD_WLAN_DEVICE), bcmdhd)
     46   LIB_WIFI_HAL := libwifi-hal-bcm
     47 else ifeq ($(BOARD_WLAN_DEVICE), qcwcn)
     48   # this is commented because none of the nexus devices
     49   # that sport Qualcomm's wifi have support for HAL
     50   # LIB_WIFI_HAL := libwifi-hal-qcom
     51 else ifeq ($(BOARD_WLAN_DEVICE), mrvl)
     52   # this is commented because none of the nexus devices
     53   # that sport Marvell's wifi have support for HAL
     54   # LIB_WIFI_HAL := libwifi-hal-mrvl
     55 else ifeq ($(BOARD_WLAN_DEVICE), MediaTek)
     56   # support MTK WIFI HAL
     57   LIB_WIFI_HAL := libwifi-hal-mt66xx
     58 endif
     59 
     60 # Build the HalUtil
     61 # ============================================================
     62 
     63 include $(CLEAR_VARS)
     64 
     65 LOCAL_REQUIRED_MODULES := libandroid_runtime libhardware_legacy
     66 
     67 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast
     68 LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses
     69 LOCAL_CPPFLAGS += -Wno-conversion-null
     70 
     71 LOCAL_C_INCLUDES += \
     72 	$(call include-path-for, libhardware)/hardware \
     73 	$(call include-path-for, libhardware_legacy)/hardware_legacy \
     74 	libcore/include
     75 
     76 LOCAL_SHARED_LIBRARIES += \
     77 	libcutils \
     78 	libnl \
     79 	libandroid_runtime \
     80 	libutils
     81 
     82 LOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL)
     83 
     84 LOCAL_SRC_FILES := \
     85 	tools/halutil/halutil.cpp
     86 
     87 LOCAL_MODULE := halutil
     88 
     89 include $(BUILD_EXECUTABLE)
     90 
     91 # Make the JNI part
     92 # ============================================================
     93 include $(CLEAR_VARS)
     94 
     95 LOCAL_REQUIRED_MODULES := libandroid_runtime libhardware_legacy
     96 
     97 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast
     98 LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses
     99 LOCAL_CPPFLAGS += -Wno-conversion-null
    100 
    101 LOCAL_C_INCLUDES += \
    102 	$(JNI_H_INCLUDE) \
    103 	$(call include-path-for, libhardware)/hardware \
    104 	$(call include-path-for, libhardware_legacy)/hardware_legacy \
    105 	libcore/include
    106 
    107 LOCAL_SHARED_LIBRARIES += \
    108 	libnativehelper \
    109 	libcutils \
    110 	libutils \
    111 	libhardware \
    112 	libhardware_legacy \
    113 	libandroid_runtime \
    114     libnl
    115 
    116 LOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL)
    117 
    118 LOCAL_SRC_FILES := \
    119 	jni/com_android_server_wifi_WifiNative.cpp \
    120 	jni/jni_helper.cpp
    121 
    122 LOCAL_MODULE := libwifi-service
    123 
    124 include $(BUILD_SHARED_LIBRARY)
    125 
    126 # Build the java code
    127 # ============================================================
    128 
    129 include $(CLEAR_VARS)
    130 
    131 LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java
    132 LOCAL_SRC_FILES := $(call all-java-files-under, java) \
    133 	$(call all-Iaidl-files-under, java) \
    134 	$(call all-logtags-files-under, java)
    135 
    136 LOCAL_JNI_SHARED_LIBRARIES := libandroid_runtime
    137 LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt services
    138 LOCAL_STATIC_JAVA_LIBRARIES := ksoap2
    139 LOCAL_REQUIRED_MODULES := services
    140 LOCAL_MODULE_TAGS :=
    141 LOCAL_MODULE := wifi-service
    142 
    143 include $(BUILD_JAVA_LIBRARY)
    144 
    145 endif
    146