xref: /openbmc/phosphor-bmc-code-mgmt/cpld/meson.build (revision f6470b5e95618fa0eeb8b03b37c53a311dfc1ef3)
1*f6470b5eSDaniel Hsucpld_src = files('cpld.cpp', 'cpld_interface.cpp', 'cpld_software_manager.cpp')
2*f6470b5eSDaniel Hsu
3*f6470b5eSDaniel Hsucpld_vendor_src = files('lattice/interface.cpp', 'lattice/lattice.cpp')
4*f6470b5eSDaniel Hsu
5*f6470b5eSDaniel Hsuexecutable(
6*f6470b5eSDaniel Hsu    'phosphor-cpld-software-update',
7*f6470b5eSDaniel Hsu    cpld_src,
8*f6470b5eSDaniel Hsu    cpld_vendor_src,
9*f6470b5eSDaniel Hsu    include_directories: [include_directories('.'), common_include, libi2c_inc],
10*f6470b5eSDaniel Hsu    dependencies: [
11*f6470b5eSDaniel Hsu        pdi_dep,
12*f6470b5eSDaniel Hsu        phosphor_logging_dep,
13*f6470b5eSDaniel Hsu        sdbusplus_dep,
14*f6470b5eSDaniel Hsu        libpldm_dep,
15*f6470b5eSDaniel Hsu        libi2c_dep,
16*f6470b5eSDaniel Hsu    ],
17*f6470b5eSDaniel Hsu    link_with: [libpldmutil, software_common_lib, libi2c_dev],
18*f6470b5eSDaniel Hsu    link_args: '-li2c',
19*f6470b5eSDaniel Hsu    install_dir: get_option('libexecdir') / 'phosphor-code-mgmt',
20*f6470b5eSDaniel Hsu    install: true,
21*f6470b5eSDaniel Hsu)
22*f6470b5eSDaniel Hsu
23*f6470b5eSDaniel Hsusystemd_system_unit_dir = dependency('systemd').get_variable(
24*f6470b5eSDaniel Hsu    'systemdsystemunitdir',
25*f6470b5eSDaniel Hsu    pkgconfig_define: ['prefix', get_option('prefix')],
26*f6470b5eSDaniel Hsu)
27*f6470b5eSDaniel Hsu
28*f6470b5eSDaniel Hsuinstall_data(
29*f6470b5eSDaniel Hsu    'xyz.openbmc_project.Software.CPLD.service',
30*f6470b5eSDaniel Hsu    install_dir: systemd_system_unit_dir,
31*f6470b5eSDaniel Hsu)
32