1#
2#  Copyright 2021 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
16import("//bt/gd/dumpsys/bundler/bundler.gni")
17import("//common-mk/flatbuffer.gni")
18
19bt_flatc_binary_schema("BluetoothGeneratedBundlerSchema_h_bfbs") {
20  sources = [ "bundler.fbs" ]
21  include_dir = "bt/gd"
22  gen_header = true
23}
24
25#
26# The remaining rules are for building on the host
27#
28
29config("bundler_defaults") {
30  cflags = [ "-fPIC" ]
31
32  cflags_cc = [
33    "-std=c++17",
34    "-Wno-unused-parameter",
35    "-Wno-unused-variable",
36    "-Wno-poison-system-directories",
37  ]
38}
39
40executable("bluetooth_flatbuffer_bundler") {
41  sources = [
42    "bundler.cc",
43    "main.cc",
44  ]
45
46  libs = [ "flatbuffers" ]
47
48  deps = [ ":BluetoothGeneratedBundlerSchema_h_bfbs" ]
49
50  configs += [ ":bundler_defaults" ]
51}
52