blob: 474c029acfeb957c926f7161af0539afedf72502 [file] [log] [blame]
Ningyuan Wange44553d2015-11-18 14:53:18 -08001#
2# Copyright (C) 2015 The Android Open Source Project
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
17{
18 'target_defaults': {
19 'variables': {
20 'deps': [
21 'libchrome-<(libbase_ver)',
22 'libbrillo-<(libbase_ver)',
23 'libshill-net-<(libbase_ver)',
24 ],
25 },
26 'cflags': [
27 '-Wextra',
28 '-Wno-unused-parameter', # base/lazy_instance.h, etc.
29 ],
30 'cflags_cc': [
Ningyuan Wangfb71beb2016-01-06 16:31:58 -080031 '-fno-strict-aliasing',
Ningyuan Wange44553d2015-11-18 14:53:18 -080032 '-Wno-missing-field-initializers', # for LAZY_INSTANCE_INITIALIZER
Ningyuan Wang48f82042016-01-04 11:28:09 -080033 '-Wno-unused-const-variable',
Ningyuan Wange44553d2015-11-18 14:53:18 -080034 ],
35 'include_dirs': [
36 # We need this include dir because we include all the local code as
37 # "dhcp_client/...".
38 '<(platform2_root)/../aosp/system/connectivity',
39 ],
40 },
41
42 'targets': [
43 {
44 'target_name': 'libdhcp_client',
45 'type': 'static_library',
46 'variables': {
47 'exported_deps': [
48 ],
49 'deps': ['<@(exported_deps)'],
50 },
51 'all_dependent_settings': {
52 'variables': {
53 'deps': [
54 '<@(exported_deps)',
55 ],
56 },
57 },
58 'sources': [
59 'daemon.cc',
Ningyuan Wangbf215782015-12-04 09:55:39 -080060 'device_info.cc',
Ningyuan Wang48f82042016-01-04 11:28:09 -080061 'dhcp_message.cc',
Ningyuan Wangfb71beb2016-01-06 16:31:58 -080062 'dhcp_options_parser.cc',
Ningyuan Wangd4b86842016-01-13 11:28:54 -080063 'dhcp_options_writer.cc',
Ningyuan Wangb52786a2015-12-10 14:25:15 -080064 'dhcpv4.cc',
Ningyuan Wangdb805e22015-11-20 14:08:47 -080065 'message_loop_event_dispatcher.cc',
Ningyuan Wang58f27062015-11-20 13:20:24 -080066 'manager.cc',
Ningyuan Wangb6836022015-12-02 14:39:01 -080067 'service.cc',
Ningyuan Wange44553d2015-11-18 14:53:18 -080068 ],
69 },
70 {
71 'target_name': 'dhcp_client',
72 'type': 'executable',
73 'dependencies': ['libdhcp_client'],
74 'sources': [
75 'main.cc',
76 ],
77 },
78 ],
Ningyuan Wang88c688a2015-12-09 17:59:01 -080079 'conditions': [
80 ['USE_test == 1', {
81 'targets': [
82 {
83 'target_name': 'dhcp_client_testrunner',
84 'type': 'executable',
85 'dependencies': ['libdhcp_client'],
86 'includes': ['../../../../platform2/common-mk/common_test.gypi'],
87 'sources': [
88 'device_info_unittest.cc',
Ningyuan Wang679654b2016-01-08 15:43:36 -080089 'dhcp_message_unittest.cc',
Ningyuan Wangfb71beb2016-01-06 16:31:58 -080090 'dhcp_options_parser_unittest.cc',
Ningyuan Wangd4b86842016-01-13 11:28:54 -080091 'dhcp_options_writer_unittest.cc',
Ningyuan Wang88c688a2015-12-09 17:59:01 -080092 'testrunner.cc',
93 ],
94 },
95 ],
96 }],
97 ],
Ningyuan Wange44553d2015-11-18 14:53:18 -080098}
99