blob: 0d868f99fc4887d828a7404d85b0bcd00ee34121 [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 += [
George Liu9008d282020-03-12 11:20:35 +080031 '../oem/ibm/libpldm/file_io.h',
Tom Joseph7f839f92020-09-21 10:20:44 +053032 '../oem/ibm/libpldm/host.h',
33 '../oem/ibm/libpldm/platform_oem_ibm.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050034 ]
35 sources += [
George Liu9008d282020-03-12 11:20:35 +080036 '../oem/ibm/libpldm/file_io.c',
Tom Joseph7f839f92020-09-21 10:20:44 +053037 '../oem/ibm/libpldm/host.c',
38 '../oem/ibm/libpldm/platform_oem_ibm.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050039 ]
40 libpldm_headers += ['../oem/ibm']
41endif
42
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060043if get_option('requester-api').enabled()
44 headers += [
45 'requester/pldm.h'
46 ]
47 sources += [
48 'requester/pldm.c'
49 ]
50 libpldm_headers += ['requester']
51endif
52
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050053install_headers(
54 headers,
55 subdir: 'libpldm')
56
57libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050058 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050059 sources,
60 implicit_include_directories: false,
61 include_directories: include_directories(libpldm_headers),
62 version: meson.project_version(),
63 install: true)
64
Patrick Williams6f4479c2021-04-16 21:39:44 -050065libpldm_dep = declare_dependency(
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050066 include_directories: include_directories(libpldm_headers),
67 link_with: libpldm)
68
69import('pkgconfig').generate(
70 name: 'libpldm',
71 description: 'PLDM protocol encode/decode C lib',
72 version: meson.project_version(),
73 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080074
75if get_option('tests').enabled()
76 subdir('tests')
77endif