blob: c5740273c436a9db945f3da72de875142370275b [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',
12 'pdr.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050013]
14
15sources = [
16 'base.c',
17 'platform.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053018 'bios.c',
John Wang02700402019-10-06 16:34:29 +080019 'bios_table.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053020 'fru.c',
Deepak Kodihalli3b02ed82020-02-06 01:18:25 -060021 'utils.c',
22 'pdr.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050023]
24
25libpldm_headers = ['.', '..']
26
27if get_option('oem-ibm').enabled()
28 headers += [
George Liu9008d282020-03-12 11:20:35 +080029 '../oem/ibm/libpldm/file_io.h',
30 '../oem/ibm/libpldm/host.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050031 ]
32 sources += [
George Liu9008d282020-03-12 11:20:35 +080033 '../oem/ibm/libpldm/file_io.c',
34 '../oem/ibm/libpldm/host.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050035 ]
36 libpldm_headers += ['../oem/ibm']
37endif
38
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060039if get_option('requester-api').enabled()
40 headers += [
41 'requester/pldm.h'
42 ]
43 sources += [
44 'requester/pldm.c'
45 ]
46 libpldm_headers += ['requester']
47endif
48
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050049install_headers(
50 headers,
51 subdir: 'libpldm')
52
53libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050054 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050055 sources,
56 implicit_include_directories: false,
57 include_directories: include_directories(libpldm_headers),
58 version: meson.project_version(),
59 install: true)
60
61libpldm = declare_dependency(
62 include_directories: include_directories(libpldm_headers),
63 link_with: libpldm)
64
65import('pkgconfig').generate(
66 name: 'libpldm',
67 description: 'PLDM protocol encode/decode C lib',
68 version: meson.project_version(),
69 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080070
71if get_option('tests').enabled()
72 subdir('tests')
73endif