blob: a667a69bb1078a7719f54117b3a590bd94d24d96 [file] [log] [blame]
Tony Lee84d430c2019-06-13 15:26:15 +08001project(
2 'phosphor-nvme',
3 'cpp',
4 version: '1.0',
5 default_options: [
6 'cpp_std=c++17',
7 ],
8)
9
10executable(
11 'nvme_main',
12 [
13 'nvme_main.cpp',
14 'nvme_manager.cpp',
Tony Lee6c595012019-06-19 10:54:59 +080015 'smbus.cpp',
16 'nvmes.cpp',
Tony Lee84d430c2019-06-13 15:26:15 +080017 ],
18 dependencies: [
19 dependency('phosphor-logging'),
20 dependency('sdbusplus'),
21 dependency('phosphor-dbus-interfaces'),
22 dependency('sdeventplus'),
23 ],
24 install: true,
25 install_dir: get_option('bindir')
26)
27
Tony Lee6c595012019-06-19 10:54:59 +080028install_data(sources : 'nvme_config.json', install_dir : '/etc/nvme')
29
Tony Lee84d430c2019-06-13 15:26:15 +080030conf_data = configuration_data()
31conf_data.set('NVME_REQUEST_NAME', '"xyz.openbmc_project.nvme.manager"')
32conf_data.set('NVME_OBJ_PATH_ROOT', '"/xyz/openbmc_project/sensors/temperature"')
33conf_data.set('NVME_OBJ_PATH', '"/xyz/openbmc_project/sensors/temperature/nvme"')
34conf_data.set('DBUS_PROPERTY_IFACE', '"org.freedesktop.DBus.Properties"')
Tony Lee89659212019-06-21 17:34:14 +080035conf_data.set('LED_GROUP_BUSNAME', '"xyz.openbmc_project.LED.GroupManager"')
36conf_data.set('LED_GROUP_IFACE', '"xyz.openbmc_project.Led.Group"')
37conf_data.set('LED_CONTROLLER_IFACE', '"xyz.openbmc_project.Led.Physical"')
38conf_data.set('ITEM_IFACE', '"xyz.openbmc_project.Inventory.Item"')
39conf_data.set('NVME_STATUS_IFACE', '"xyz.openbmc_project.Nvme.Status"')
40conf_data.set('ASSET_IFACE', '"xyz.openbmc_project.Inventory.Decorator.Asset"')
41conf_data.set('INVENTORY_BUSNAME', '"xyz.openbmc_project.Inventory.Manager"')
42conf_data.set('NVME_INVENTORY_PATH', '"/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme"')
43conf_data.set('INVENTORY_NAMESPACE', '"/xyz/openbmc_project/inventory"')
44conf_data.set('INVENTORY_MANAGER_IFACE', '"xyz.openbmc_project.Inventory.Manager"')
Tony Lee84d430c2019-06-13 15:26:15 +080045
46configure_file(output : 'config.h',
47 configuration : conf_data)
Benjamin Fairfc8472c2020-04-10 13:33:54 -070048
49systemd = dependency('systemd')
50conf_data = configuration_data()
51conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
52configure_file(
53 input: 'xyz.openbmc_project.nvme.manager.service.in',
54 output: 'xyz.openbmc_project.nvme.manager.service',
55 configuration: conf_data,
56 install: true,
57 install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'))