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
15LOCAL_PATH := $(call my-dir)
16
17ifneq ($(TARGET_BUILD_PDK), true)
18
19# Make the JNI part
20# ============================================================
21include $(CLEAR_VARS)
22
23LOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \
24                -Wunused-variable -Winit-self -Wwrite-strings -Wshadow
25
26LOCAL_C_INCLUDES += \
27	$(JNI_H_INCLUDE) \
28
29LOCAL_SHARED_LIBRARIES += \
30	liblog \
31	libnativehelper \
32	libcutils \
33	libutils \
34	libdl
35
36LOCAL_SRC_FILES := \
37	jni/com_android_server_wifi_WifiNative.cpp \
38	jni/jni_helper.cpp
39
40LOCAL_MODULE := libwifi-service
41
42include $(BUILD_SHARED_LIBRARY)
43
44# Build the java code
45# ============================================================
46
47wificond_aidl_path := system/connectivity/wificond/aidl
48wificond_aidl_rel_path := ../../../../../$(wificond_aidl_path)
49
50include $(CLEAR_VARS)
51
52LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java $(wificond_aidl_path)
53LOCAL_SRC_FILES := $(call all-java-files-under, java) \
54	$(call all-Iaidl-files-under, java) \
55	$(call all-Iaidl-files-under, $(wificond_aidl_rel_path)) \
56	$(call all-logtags-files-under, java)
57
58LOCAL_JAVA_LIBRARIES := \
59	android.hidl.manager-V1.0-java \
60	bouncycastle \
61	conscrypt \
62	error_prone_annotations \
63	jsr305 \
64	services
65LOCAL_STATIC_JAVA_LIBRARIES := \
66	android.hardware.wifi-V1.0-java \
67	android.hardware.wifi-V1.1-java \
68	android.hardware.wifi-V1.2-java \
69	android.hardware.wifi.hostapd-V1.0-java \
70	android.hardware.wifi.supplicant-V1.0-java \
71	android.hardware.wifi.supplicant-V1.1-java
72LOCAL_REQUIRED_MODULES := \
73	services \
74	libwifi-service \
75	cacerts_wfa
76LOCAL_MODULE_TAGS :=
77LOCAL_MODULE := wifi-service
78LOCAL_INIT_RC := wifi-events.rc
79
80LOCAL_DEX_PREOPT_APP_IMAGE := false
81LOCAL_DEX_PREOPT_GENERATE_PROFILE := true
82LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING := frameworks/base/services/art-profile
83LOCAL_ERROR_PRONE_FLAGS := -Xep:CheckReturnValue:ERROR
84
85include $(BUILD_JAVA_LIBRARY)
86
87endif  # !TARGET_BUILD_PDK
88