blob: bd100962b5ba4109998cd61b71ef1ef32c575e36 [file] [log] [blame]
Deepak Kodihalli3c275e12019-09-21 06:39:39 -05001headers = [
2 'base.h',
3 'pldm_types.h',
4 'platform.h',
5 'bios.h',
John Wang02700402019-10-06 16:34:29 +08006 'bios_table.h',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -05007 'states.h',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +05308 'fru.h',
John Wangd8702f62019-10-31 10:06:35 +08009 'utils.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050010]
11
12sources = [
13 'base.c',
14 'platform.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053015 'bios.c',
John Wang02700402019-10-06 16:34:29 +080016 'bios_table.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053017 'fru.c',
Deepak Kodihalli3b02ed82020-02-06 01:18:25 -060018 'utils.c',
19 'pdr.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050020]
21
22libpldm_headers = ['.', '..']
23
24if get_option('oem-ibm').enabled()
25 headers += [
26 '../oem/ibm/libpldm/file_io.h'
27 ]
28 sources += [
29 '../oem/ibm/libpldm/file_io.c'
30 ]
31 libpldm_headers += ['../oem/ibm']
32endif
33
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060034if get_option('requester-api').enabled()
35 headers += [
36 'requester/pldm.h'
37 ]
38 sources += [
39 'requester/pldm.c'
40 ]
41 libpldm_headers += ['requester']
42endif
43
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050044install_headers(
45 headers,
46 subdir: 'libpldm')
47
48libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050049 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050050 sources,
51 implicit_include_directories: false,
52 include_directories: include_directories(libpldm_headers),
53 version: meson.project_version(),
54 install: true)
55
56libpldm = declare_dependency(
57 include_directories: include_directories(libpldm_headers),
58 link_with: libpldm)
59
60import('pkgconfig').generate(
61 name: 'libpldm',
62 description: 'PLDM protocol encode/decode C lib',
63 version: meson.project_version(),
64 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080065
66if get_option('tests').enabled()
67 subdir('tests')
68endif