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 15cc_defaults { 16 name: "libwifilogd_flags", 17 cflags: [ 18 "-Wall", 19 "-Wextra", 20 "-Weffc++", 21 "-Weverything", 22 "-Wno-c++98-compat", 23 "-Wno-c++98-compat-pedantic", 24 "-Wno-padded", 25 "-Werror", 26 27 ], 28 include_dirs: ["system/connectivity"], 29 shared_libs: [ 30 "libbase", 31 "libcutils", 32 "liblog", 33 ], 34 35} 36 37// wifilogd static library 38cc_library_static { 39 name: "libwifilogd", 40 srcs: [ 41 "command_processor.cpp", 42 "main_loop.cpp", 43 "memory_reader.cpp", 44 "message_buffer.cpp", 45 "os.cpp", 46 "raw_os.cpp", 47 ], 48 defaults: ["libwifilogd_flags"], 49} 50 51// wifilogd unit tests. 52cc_test { 53 name: "wifilogd_unit_test", 54 test_suites: ["device-tests"], 55 defaults: ["libwifilogd_flags"], 56 cppflags: [ 57 "-Wno-undef", 58 "-Wno-missing-noreturn", 59 "-Wno-shift-sign-overflow", 60 "-Wno-used-but-marked-unused", 61 "-Wno-deprecated", 62 "-Wno-weak-vtables", 63 "-Wno-sign-conversion", 64 "-Wno-global-constructors", 65 "-Wno-covered-switch-default", 66 ], 67 srcs: [ 68 "tests/byte_buffer_unittest.cpp", 69 "tests/command_processor_unittest.cpp", 70 "tests/local_utils_unittest.cpp", 71 "tests/main.cpp", 72 "tests/main_loop_unittest.cpp", 73 "tests/memory_reader_unittest.cpp", 74 "tests/message_buffer_unittest.cpp", 75 "tests/mock_command_processor.cpp", 76 "tests/mock_os.cpp", 77 "tests/mock_raw_os.cpp", 78 "tests/os_unittest.cpp", 79 "tests/protocol_unittest.cpp", 80 ], 81 static_libs: [ 82 "libgmock", 83 "libwifilogd", 84 ], 85} 86