blob: 5f55f574517a9df72704b8bc8202a54f896ae579 [file] [log] [blame]
Arman Uguray9ca3fb82015-05-26 14:50:36 -07001#
2# Copyright (C) 2015 Google, Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at:
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
Arman Uguraycdc6f3a2015-05-21 13:39:18 -070017declare_args() {
18 # Include path for hardware/bluetooth.h
19 libhw_include_path = ""
20 core_include_path = ""
21}
22
23config("default_include_dirs") {
24 # TODO(armansito): Remove "core_include_path" once the cutils includes have
25 # been removed.
26 assert(libhw_include_path != "", "libhardware_include_path build argument wasn't provided.")
27 assert(core_include_path != "", "core_include_path build argument wasn't provided.")
28 include_dirs = [
29 libhw_include_path,
30 core_include_path,
31 ]
32}
33
Scott James Remnant4c292312015-05-12 13:58:49 -070034config("linux") {
Arman Uguraycdc6f3a2015-05-21 13:39:18 -070035 # TODO(keybuk): AndroidConfig.h or equivalent
Scott James Remnant4c292312015-05-12 13:58:49 -070036
37 cflags = [
38 "-Wall",
39 "-Werror",
40 "-g",
41 "-O0",
Arman Uguraye4477782015-05-29 14:46:30 -070042 "-fpic",
43 "-fdata-sections",
44 "-ffunction-sections",
45 "-fvisibility=hidden",
Scott James Remnant4c292312015-05-12 13:58:49 -070046 ]
47
48 cflags_c = [
49 "-std=c99"
50 ]
51
52 defines = [
53 "_FORTIFY_SOURCE=2",
54 "_GNU_SOURCE",
55 "HAS_NO_BDROID_BUILDCFG",
56 "LOG_NDEBUG=1",
Arman Uguraye4477782015-05-29 14:46:30 -070057 "EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
Arman Uguraycdc6f3a2015-05-21 13:39:18 -070058
59 # This is a macro to that can be used by source code to detect if the
60 # current build is done by GN or via Android.mk. This is a temporary
61 # workaround until we can remove all Android-specific dependencies.
62 "OS_GENERIC",
Scott James Remnant4c292312015-05-12 13:58:49 -070063 ]
64}
65
66config("pic") {
67 cflags = [ "-fPIC" ]
68}
69
70config("gc") {
71 ldflags = [ "-Wl,--gc-sections" ]
72}