• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2016 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
17wifi_system_cflags := \
18    -Wall \
19    -Werror \
20    -Wextra \
21    -Winit-self \
22    -Wno-unused-function \
23    -Wno-unused-parameter \
24    -Wshadow \
25    -Wunused-variable \
26    -Wwrite-strings
27
28# Device independent wifi system logic.
29# ============================================================
30include $(CLEAR_VARS)
31LOCAL_MODULE := libwifi-system
32LOCAL_CFLAGS := $(wifi_system_cflags)
33LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
34LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
35LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libbase
36LOCAL_SHARED_LIBRARIES := \
37    libbase \
38    libcrypto \
39    libcutils
40
41LOCAL_SRC_FILES := \
42    hostapd_manager.cpp \
43    interface_tool.cpp \
44    supplicant_manager.cpp
45include $(BUILD_SHARED_LIBRARY)
46
47# Test utilities (e.g. mock classes) for libwifi-system
48# ============================================================
49include $(CLEAR_VARS)
50LOCAL_MODULE := libwifi-system-test
51LOCAL_CFLAGS := $(wifi_system_cflags)
52LOCAL_C_INCLUDES := \
53    $(LOCAL_PATH)/include \
54    $(LOCAL_PATH)/testlib/include
55LOCAL_STATIC_LIBRARIES := libgmock
56LOCAL_EXPORT_C_INCLUDE_DIRS := \
57    $(LOCAL_PATH)/include \
58    $(LOCAL_PATH)/testlib/include
59include $(BUILD_STATIC_LIBRARY)
60
61
62# Unit tests for libwifi-system
63# ============================================================
64include $(CLEAR_VARS)
65LOCAL_MODULE := libwifi-system_tests
66LOCAL_CPPFLAGS := $(wificond_cpp_flags)
67LOCAL_SRC_FILES := \
68    tests/main.cpp \
69    tests/hostapd_manager_unittest.cpp
70LOCAL_STATIC_LIBRARIES := \
71    libgmock \
72    libgtest
73LOCAL_SHARED_LIBRARIES := \
74    libbase \
75    libwifi-system
76include $(BUILD_NATIVE_TEST)
77