Logan Chien | de086d4 | 2017-04-19 21:40:12 +0800 | [diff] [blame] | 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 | |
| 15 | cc_defaults { |
| 16 | name: "libwifi-system-defaults", |
| 17 | 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 | } |
| 29 | |
| 30 | // Device independent wifi system logic. |
| 31 | // ============================================================ |
Tri Vo | f43cfab | 2017-08-04 10:26:48 -0700 | [diff] [blame] | 32 | cc_library { |
Logan Chien | de086d4 | 2017-04-19 21:40:12 +0800 | [diff] [blame] | 33 | name: "libwifi-system", |
| 34 | defaults: ["libwifi-system-defaults"], |
| 35 | export_include_dirs: ["include"], |
| 36 | export_shared_lib_headers: ["libbase"], |
| 37 | shared_libs: [ |
| 38 | "libbase", |
| 39 | "libcrypto", |
| 40 | "libcutils", |
| 41 | ], |
| 42 | srcs: [ |
| 43 | "hostapd_manager.cpp", |
Logan Chien | de086d4 | 2017-04-19 21:40:12 +0800 | [diff] [blame] | 44 | "supplicant_manager.cpp", |
| 45 | ], |
| 46 | } |
| 47 | |
| 48 | // Test utilities (e.g. mock classes) for libwifi-system |
| 49 | // ============================================================ |
| 50 | cc_library_static { |
| 51 | name: "libwifi-system-test", |
| 52 | defaults: ["libwifi-system-defaults"], |
| 53 | static_libs: ["libgmock"], |
| 54 | export_include_dirs: [ |
| 55 | "include", |
| 56 | "testlib/include", |
| 57 | ], |
| 58 | } |
| 59 | |
| 60 | // Unit tests for libwifi-system |
| 61 | // ============================================================ |
| 62 | cc_test { |
| 63 | name: "libwifi-system_tests", |
| 64 | defaults: ["libwifi-system-defaults"], |
| 65 | srcs: [ |
| 66 | "tests/main.cpp", |
| 67 | "tests/hostapd_manager_unittest.cpp", |
| 68 | ], |
| 69 | static_libs: [ |
| 70 | "libgmock", |
| 71 | ], |
| 72 | shared_libs: [ |
| 73 | "libbase", |
| 74 | "libwifi-system", |
| 75 | ], |
| 76 | } |