11285115cSWilliam A. Kennington III# Copyright 2021 Google LLC 21285115cSWilliam A. Kennington III# 31285115cSWilliam A. Kennington III# Licensed under the Apache License, Version 2.0 (the "License"); 41285115cSWilliam A. Kennington III# you may not use this file except in compliance with the License. 51285115cSWilliam A. Kennington III# You may obtain a copy of the License at 61285115cSWilliam A. Kennington III# 71285115cSWilliam A. Kennington III# http://www.apache.org/licenses/LICENSE-2.0 81285115cSWilliam A. Kennington III# 91285115cSWilliam A. Kennington III# Unless required by applicable law or agreed to in writing, software 101285115cSWilliam A. Kennington III# distributed under the License is distributed on an "AS IS" BASIS, 111285115cSWilliam A. Kennington III# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 121285115cSWilliam A. Kennington III# See the License for the specific language governing permissions and 131285115cSWilliam A. Kennington III# limitations under the License. 141285115cSWilliam A. Kennington III 151285115cSWilliam A. Kennington IIIncsid_headers = include_directories('.') 161285115cSWilliam A. Kennington III 171285115cSWilliam A. Kennington IIIncsid_deps = [ 181285115cSWilliam A. Kennington III dependency('sdbusplus', fallback: ['sdbusplus', 'sdbusplus_dep']), 19d237c6ccSWilliam A. Kennington III dependency('stdplus', fallback: ['stdplus', 'stdplus_dep']), 201285115cSWilliam A. Kennington III] 211285115cSWilliam A. Kennington III 221285115cSWilliam A. Kennington IIIncsid_lib = static_library( 231285115cSWilliam A. Kennington III 'ncsid', 241285115cSWilliam A. Kennington III [ 251285115cSWilliam A. Kennington III 'net_config.cpp', 261285115cSWilliam A. Kennington III 'net_iface.cpp', 271285115cSWilliam A. Kennington III 'net_sockio.cpp', 281285115cSWilliam A. Kennington III 'ncsi_sockio.cpp', 291285115cSWilliam A. Kennington III 'ncsi_state_machine.cpp', 301285115cSWilliam A. Kennington III 'platforms/nemora/portable/ncsi_fsm.c', 311285115cSWilliam A. Kennington III 'platforms/nemora/portable/ncsi_client.c', 321285115cSWilliam A. Kennington III 'platforms/nemora/portable/ncsi_server.c', 331285115cSWilliam A. Kennington III ], 341285115cSWilliam A. Kennington III include_directories: ncsid_headers, 351285115cSWilliam A. Kennington III implicit_include_directories: false, 361285115cSWilliam A. Kennington III dependencies: ncsid_deps) 371285115cSWilliam A. Kennington III 381285115cSWilliam A. Kennington IIIncsid = declare_dependency( 391285115cSWilliam A. Kennington III dependencies: ncsid_deps, 401285115cSWilliam A. Kennington III include_directories: ncsid_headers, 411285115cSWilliam A. Kennington III link_with: ncsid_lib) 421285115cSWilliam A. Kennington III 431285115cSWilliam A. Kennington IIIexecutable( 441285115cSWilliam A. Kennington III 'ncsid', 451285115cSWilliam A. Kennington III 'ncsid.cpp', 461285115cSWilliam A. Kennington III implicit_include_directories: false, 471285115cSWilliam A. Kennington III dependencies: ncsid, 481285115cSWilliam A. Kennington III install: true, 491285115cSWilliam A. Kennington III install_dir: get_option('libexecdir')) 501285115cSWilliam A. Kennington III 511285115cSWilliam A. Kennington IIInormalize_ip = executable( 521285115cSWilliam A. Kennington III 'normalize_ip', 531285115cSWilliam A. Kennington III 'normalize_ip.c', 541285115cSWilliam A. Kennington III implicit_include_directories: false, 551285115cSWilliam A. Kennington III install: true) 561285115cSWilliam A. Kennington III 571285115cSWilliam A. Kennington IIInormalize_mac = executable( 581285115cSWilliam A. Kennington III 'normalize_mac', 591285115cSWilliam A. Kennington III 'normalize_mac.c', 601285115cSWilliam A. Kennington III implicit_include_directories: false, 611285115cSWilliam A. Kennington III install: true) 621285115cSWilliam A. Kennington III 631285115cSWilliam A. Kennington IIIinstall_data( 64379b061fSWilliam A. Kennington III 'update_ra_gw.sh', 651285115cSWilliam A. Kennington III install_mode: 'rwxr-xr-x', 661285115cSWilliam A. Kennington III install_dir: get_option('libexecdir')) 671285115cSWilliam A. Kennington III 681285115cSWilliam A. Kennington IIIinstall_data( 691285115cSWilliam A. Kennington III 'ncsid_lib.sh', 701285115cSWilliam A. Kennington III install_mode: 'rw-r--r--', 711285115cSWilliam A. Kennington III install_dir: get_option('libexecdir')) 721285115cSWilliam A. Kennington III 731285115cSWilliam A. Kennington IIIsystemd = dependency('systemd') 74*4c4e94f0SPatrick Williamssystemunitdir = systemd.get_variable('systemdsystemunitdir') 751285115cSWilliam A. Kennington III 761285115cSWilliam A. Kennington IIIlibexecdir = get_option('prefix') / get_option('libexecdir') 771285115cSWilliam A. Kennington III 781285115cSWilliam A. Kennington IIIconfigure_file( 791285115cSWilliam A. Kennington III configuration: {'BIN': libexecdir / 'ncsid'}, 801285115cSWilliam A. Kennington III input: 'ncsid@.service.in', 811285115cSWilliam A. Kennington III output: 'ncsid@.service', 821285115cSWilliam A. Kennington III install_mode: 'rw-r--r--', 831285115cSWilliam A. Kennington III install_dir: systemunitdir) 841285115cSWilliam A. Kennington III 851285115cSWilliam A. Kennington IIIconfigure_file( 86379b061fSWilliam A. Kennington III configuration: {'BIN': libexecdir / 'update_ra_gw.sh'}, 87379b061fSWilliam A. Kennington III input: 'update-ra-gw@.service.in', 88379b061fSWilliam A. Kennington III output: 'update-ra-gw@.service', 89379b061fSWilliam A. Kennington III install_mode: 'rw-r--r--', 90379b061fSWilliam A. Kennington III install_dir: systemunitdir) 91379b061fSWilliam A. Kennington III 921285115cSWilliam A. Kennington IIIinstall_data( 931285115cSWilliam A. Kennington III 'nic-hostful@.target', 941285115cSWilliam A. Kennington III 'nic-hostless@.target', 951285115cSWilliam A. Kennington III install_mode: 'rw-r--r--', 961285115cSWilliam A. Kennington III install_dir: systemunitdir) 97