Ningyuan Wang | e44553d | 2015-11-18 14:53:18 -0800 | [diff] [blame] | 1 | # |
| 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 Wang | fb71beb | 2016-01-06 16:31:58 -0800 | [diff] [blame] | 31 | '-fno-strict-aliasing', |
Ningyuan Wang | e44553d | 2015-11-18 14:53:18 -0800 | [diff] [blame] | 32 | '-Wno-missing-field-initializers', # for LAZY_INSTANCE_INITIALIZER |
Ningyuan Wang | 48f8204 | 2016-01-04 11:28:09 -0800 | [diff] [blame] | 33 | '-Wno-unused-const-variable', |
Ningyuan Wang | e44553d | 2015-11-18 14:53:18 -0800 | [diff] [blame] | 34 | ], |
| 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 Wang | bf21578 | 2015-12-04 09:55:39 -0800 | [diff] [blame] | 60 | 'device_info.cc', |
Ningyuan Wang | 48f8204 | 2016-01-04 11:28:09 -0800 | [diff] [blame] | 61 | 'dhcp_message.cc', |
Ningyuan Wang | fb71beb | 2016-01-06 16:31:58 -0800 | [diff] [blame] | 62 | 'dhcp_options_parser.cc', |
Ningyuan Wang | d4b8684 | 2016-01-13 11:28:54 -0800 | [diff] [blame] | 63 | 'dhcp_options_writer.cc', |
Ningyuan Wang | b52786a | 2015-12-10 14:25:15 -0800 | [diff] [blame] | 64 | 'dhcpv4.cc', |
Ningyuan Wang | db805e2 | 2015-11-20 14:08:47 -0800 | [diff] [blame] | 65 | 'message_loop_event_dispatcher.cc', |
Ningyuan Wang | 58f2706 | 2015-11-20 13:20:24 -0800 | [diff] [blame] | 66 | 'manager.cc', |
Ningyuan Wang | b683602 | 2015-12-02 14:39:01 -0800 | [diff] [blame] | 67 | 'service.cc', |
Ningyuan Wang | e44553d | 2015-11-18 14:53:18 -0800 | [diff] [blame] | 68 | ], |
| 69 | }, |
| 70 | { |
| 71 | 'target_name': 'dhcp_client', |
| 72 | 'type': 'executable', |
| 73 | 'dependencies': ['libdhcp_client'], |
| 74 | 'sources': [ |
| 75 | 'main.cc', |
| 76 | ], |
| 77 | }, |
| 78 | ], |
Ningyuan Wang | 88c688a | 2015-12-09 17:59:01 -0800 | [diff] [blame] | 79 | '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 Wang | 679654b | 2016-01-08 15:43:36 -0800 | [diff] [blame] | 89 | 'dhcp_message_unittest.cc', |
Ningyuan Wang | fb71beb | 2016-01-06 16:31:58 -0800 | [diff] [blame] | 90 | 'dhcp_options_parser_unittest.cc', |
Ningyuan Wang | d4b8684 | 2016-01-13 11:28:54 -0800 | [diff] [blame] | 91 | 'dhcp_options_writer_unittest.cc', |
Ningyuan Wang | 88c688a | 2015-12-09 17:59:01 -0800 | [diff] [blame] | 92 | 'testrunner.cc', |
| 93 | ], |
| 94 | }, |
| 95 | ], |
| 96 | }], |
| 97 | ], |
Ningyuan Wang | e44553d | 2015-11-18 14:53:18 -0800 | [diff] [blame] | 98 | } |
| 99 | |