blob: 184524bd799f47092f1889c744e4b31cdbd9e2d6 [file] [log] [blame]
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
cc_library_static {
name: "chre_chpp_linux",
vendor: true,
cflags: [
"-DCHPP_CLIENT_ENABLED_DISCOVERY",
"-DCHPP_CLIENT_ENABLED_LOOPBACK",
"-DCHPP_CLIENT_ENABLED_GNSS",
"-DCHPP_CLIENT_ENABLED_WIFI",
"-DCHPP_CLIENT_ENABLED_WWAN",
"-DCHPP_SERVICE_ENABLED_GNSS",
"-DCHPP_SERVICE_ENABLED_WIFI",
"-DCHPP_SERVICE_ENABLED_WWAN",
// clock_gettime() requires _POSIX_C_SOURCE >= 199309L
"-D_POSIX_C_SOURCE=199309L",
// Required for pthread_setname_np()
"-D_GNU_SOURCE"
],
conlyflags: ["-std=c11"],
srcs: [
"transport.c",
"app.c",
"clients.c",
"services.c",
"clients/discovery.c",
"clients/loopback.c",
"clients/gnss.c",
"clients/wifi.c",
"clients/wwan.c",
"services/discovery.c",
"services/loopback.c",
"services/nonhandle.c",
"services/gnss.c",
"services/gnss_convert.c",
"services/wifi.c",
"services/wifi_convert.c",
"services/wwan.c",
"services/wwan_convert.c",
"platform/pal_api.c",
"platform/linux/link.c",
"platform/linux/memory.c",
"platform/linux/notifier.c",
"platform/linux/services/platform_gnss.c",
"platform/linux/services/platform_wifi.c",
"platform/linux/services/platform_wwan.c",
],
export_include_dirs: [
"platform/linux/include",
"include",
],
header_libs: [
"chre_pal",
"chre_api",
],
export_header_lib_headers: [
"chre_pal",
"chre_api",
],
host_supported: true,
}
cc_test_host {
name: "chre_chpp_linux_tests",
srcs: [
"test/app_test_base.cpp",
"test/loopback_test.cpp",
"test/transport_test.cpp",
],
static_libs: ["chre_chpp_linux"],
}
cc_test_host {
name: "chre_chpp_convert_tests",
srcs: [
"test/wifi_convert_test.cpp",
"test/wwan_convert_test.cpp"
],
static_libs: ["chre_chpp_linux"],
}