blob: edd0727710952276d0a17d42d55693c046eca9c8 [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',
Eddie Jamesbbbbae12021-10-14 09:24:23 -050033 '../oem/ibm/libpldm/platform_oem_ibm.h',
34 '../oem/ibm/libpldm/state_set_oem_ibm.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050035 ]
36 sources += [
George Liu9008d282020-03-12 11:20:35 +080037 '../oem/ibm/libpldm/file_io.c',
Tom Joseph7f839f92020-09-21 10:20:44 +053038 '../oem/ibm/libpldm/host.c',
39 '../oem/ibm/libpldm/platform_oem_ibm.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050040 ]
41 libpldm_headers += ['../oem/ibm']
42endif
43
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060044if get_option('requester-api').enabled()
45 headers += [
46 'requester/pldm.h'
47 ]
48 sources += [
49 'requester/pldm.c'
50 ]
51 libpldm_headers += ['requester']
52endif
53
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050054install_headers(
55 headers,
56 subdir: 'libpldm')
57
58libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050059 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050060 sources,
61 implicit_include_directories: false,
62 include_directories: include_directories(libpldm_headers),
63 version: meson.project_version(),
64 install: true)
65
Patrick Williams6f4479c2021-04-16 21:39:44 -050066libpldm_dep = declare_dependency(
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050067 include_directories: include_directories(libpldm_headers),
68 link_with: libpldm)
69
70import('pkgconfig').generate(
71 name: 'libpldm',
72 description: 'PLDM protocol encode/decode C lib',
73 version: meson.project_version(),
74 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080075
76if get_option('tests').enabled()
77 subdir('tests')
78endif