Home | History | Annotate | Download | only in dhcp_client
      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': [
     31       '-fno-strict-aliasing',
     32       '-Wno-missing-field-initializers', # for LAZY_INSTANCE_INITIALIZER
     33       '-Wno-unused-const-variable',
     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',
     60         'device_info.cc',
     61         'dhcp_message.cc',
     62         'dhcp_options_parser.cc',
     63         'dhcp_options_writer.cc',
     64         'dhcpv4.cc',
     65         'message_loop_event_dispatcher.cc',
     66         'manager.cc',
     67         'service.cc',
     68       ],
     69     },
     70     {
     71       'target_name': 'dhcp_client',
     72       'type': 'executable',
     73       'dependencies': ['libdhcp_client'],
     74       'sources': [
     75         'main.cc',
     76       ],
     77     },
     78   ],
     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',
     89             'dhcp_message_unittest.cc',
     90             'dhcp_options_parser_unittest.cc',
     91             'dhcp_options_writer_unittest.cc',
     92             'testrunner.cc',
     93           ],
     94         },
     95       ],
     96     }],
     97   ],
     98 }
     99 
    100