blob: 62192e4864ed414e9287426e8831cffd890c8615 [file] [log] [blame]
Vinit Deshpande155b9d02014-01-08 23:46:46 +00001# 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
15LOCAL_PATH := $(call my-dir)
16
Colin Cross432674a2014-03-18 12:39:15 -070017ifneq ($(TARGET_BUILD_PDK), true)
18
Vinit Deshpande155b9d02014-01-08 23:46:46 +000019# Make the JNI part
20# ============================================================
21include $(CLEAR_VARS)
22
Mitchell Wills208f92c2016-02-25 13:43:25 -080023LOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \
24 -Wunused-variable -Winit-self -Wwrite-strings -Wshadow
Vinit Deshpande155b9d02014-01-08 23:46:46 +000025
26LOCAL_C_INCLUDES += \
27 $(JNI_H_INCLUDE) \
Vinit Deshapnde13cf25e2014-05-07 20:30:06 -070028 libcore/include
Vinit Deshapnde766cb4b2014-05-07 18:00:44 -070029
Vinit Deshpande155b9d02014-01-08 23:46:46 +000030LOCAL_SHARED_LIBRARIES += \
Dimitry Ivanovd1ee51c2016-02-12 17:06:26 -080031 liblog \
Vinit Deshpande155b9d02014-01-08 23:46:46 +000032 libnativehelper \
33 libcutils \
34 libutils \
Christopher Wiley94a18442016-06-15 13:04:47 -070035 libdl \
Christopher Wiley189a1ef2016-06-15 12:54:12 -070036 libwifi-hal \
Christopher Wiley94a18442016-06-15 13:04:47 -070037 libwifi-system
Vinit Deshapnde7ef73dd2014-02-28 08:42:14 -080038
Vinit Deshapnde7f9a15d2014-05-07 16:29:44 -070039LOCAL_SRC_FILES := \
40 jni/com_android_server_wifi_WifiNative.cpp \
41 jni/jni_helper.cpp
42
Etan Cohen47c56b12016-03-04 18:00:29 -080043ifeq ($(BOARD_HAS_NAN), true)
Etan Cohen956f54b2015-09-29 13:49:16 -070044LOCAL_SRC_FILES += \
45 jni/com_android_server_wifi_nan_WifiNanNative.cpp
46endif
47
Vinit Deshpande155b9d02014-01-08 23:46:46 +000048LOCAL_MODULE := libwifi-service
49
50include $(BUILD_SHARED_LIBRARY)
Colin Cross432674a2014-03-18 12:39:15 -070051
Vinit Deshapnde766cb4b2014-05-07 18:00:44 -070052# Build the java code
Vinit Deshapnde7f9a15d2014-05-07 16:29:44 -070053# ============================================================
54
Christopher Wileyed63ba72016-06-24 11:16:54 -070055wificond_aidl_path := system/connectivity/wificond/aidl
56wificond_aidl_rel_path := ../../../../../$(wificond_aidl_path)
57
Vinit Deshapnde7f9a15d2014-05-07 16:29:44 -070058include $(CLEAR_VARS)
59
Christopher Wileyed63ba72016-06-24 11:16:54 -070060LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java $(wificond_aidl_path)
Vinit Deshapnde766cb4b2014-05-07 18:00:44 -070061LOCAL_SRC_FILES := $(call all-java-files-under, java) \
62 $(call all-Iaidl-files-under, java) \
Christopher Wileyed63ba72016-06-24 11:16:54 -070063 $(call all-Iaidl-files-under, $(wificond_aidl_rel_path)) \
Glen Kuhne1b067832016-01-04 13:50:09 -080064 $(call all-logtags-files-under, java) \
65 $(call all-proto-files-under, proto)
Vinit Deshapnde7f9a15d2014-05-07 16:29:44 -070066
Etan Cohen47c56b12016-03-04 18:00:29 -080067ifneq ($(BOARD_HAS_NAN), true)
Etan Cohen956f54b2015-09-29 13:49:16 -070068LOCAL_SRC_FILES := $(filter-out $(call all-java-files-under, \
69 java/com/android/server/wifi/nan),$(LOCAL_SRC_FILES))
70endif
71
mukesh agrawale4c87d42016-08-05 14:42:42 -070072LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt jsr305 services
Vinit Deshapnde766cb4b2014-05-07 18:00:44 -070073LOCAL_REQUIRED_MODULES := services
74LOCAL_MODULE_TAGS :=
75LOCAL_MODULE := wifi-service
Glen Kuhne1b067832016-01-04 13:50:09 -080076LOCAL_PROTOC_OPTIMIZE_TYPE := nano
Vinit Deshapnde7f9a15d2014-05-07 16:29:44 -070077
Vinit Deshapnde766cb4b2014-05-07 18:00:44 -070078include $(BUILD_JAVA_LIBRARY)
Vinit Deshapnde7f9a15d2014-05-07 16:29:44 -070079
Vinit Deshapnde766cb4b2014-05-07 18:00:44 -070080endif