blob: 9c719d323923abd4542bc574b357449107b7e006 [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',
Tom Josephd64a1dd2020-06-23 14:30:37 +05307 'entity.h',
Deepak Kodihalli8bf521f2020-07-21 12:39:04 +00008 'states.h',
Tom Josephc4bcc1f2020-06-23 15:48:25 +05309 'state_set.h',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053010 'fru.h',
Dhruvaraj Subhashchandran442210e2020-03-25 00:54:13 -050011 'utils.h',
gokulsanker138ceba2021-04-05 13:25:25 +053012 'pdr.h',
13 'firmware_update.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050014]
15
16sources = [
17 'base.c',
18 'platform.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053019 'bios.c',
John Wang02700402019-10-06 16:34:29 +080020 'bios_table.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053021 'fru.c',
Deepak Kodihalli3b02ed82020-02-06 01:18:25 -060022 'utils.c',
gokulsanker138ceba2021-04-05 13:25:25 +053023 'pdr.c',
24 'firmware_update.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050025]
26
27libpldm_headers = ['.', '..']
28
29if get_option('oem-ibm').enabled()
30 headers += [
Manojkiran Eda998dc4e2022-07-28 08:18:03 +053031 'oem/ibm/libpldm/entity_oem_ibm.h',
32 'oem/ibm/libpldm/file_io.h',
33 'oem/ibm/libpldm/host.h',
34 'oem/ibm/libpldm/platform_oem_ibm.h',
35 'oem/ibm/libpldm/state_set_oem_ibm.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050036 ]
37 sources += [
Manojkiran Eda998dc4e2022-07-28 08:18:03 +053038 'oem/ibm/libpldm/file_io.c',
39 'oem/ibm/libpldm/host.c',
40 'oem/ibm/libpldm/platform_oem_ibm.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050041 ]
Manojkiran Eda998dc4e2022-07-28 08:18:03 +053042 libpldm_headers += ['oem/ibm']
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050043endif
44
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060045if get_option('requester-api').enabled()
46 headers += [
47 'requester/pldm.h'
48 ]
49 sources += [
50 'requester/pldm.c'
51 ]
52 libpldm_headers += ['requester']
53endif
54
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050055install_headers(
56 headers,
57 subdir: 'libpldm')
58
59libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050060 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050061 sources,
62 implicit_include_directories: false,
63 include_directories: include_directories(libpldm_headers),
64 version: meson.project_version(),
65 install: true)
66
Patrick Williams6f4479c2021-04-16 21:39:44 -050067libpldm_dep = declare_dependency(
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050068 include_directories: include_directories(libpldm_headers),
69 link_with: libpldm)
70
71import('pkgconfig').generate(
72 name: 'libpldm',
73 description: 'PLDM protocol encode/decode C lib',
74 version: meson.project_version(),
75 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080076
77if get_option('tests').enabled()
78 subdir('tests')
79endif