blob: e884f661d8dd0864dd8efdc1e52466818e020dcf [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',
Tom Joseph7f839f92020-09-21 10:20:44 +053030 '../oem/ibm/libpldm/host.h',
31 '../oem/ibm/libpldm/platform_oem_ibm.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050032 ]
33 sources += [
George Liu9008d282020-03-12 11:20:35 +080034 '../oem/ibm/libpldm/file_io.c',
Tom Joseph7f839f92020-09-21 10:20:44 +053035 '../oem/ibm/libpldm/host.c',
36 '../oem/ibm/libpldm/platform_oem_ibm.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050037 ]
38 libpldm_headers += ['../oem/ibm']
39endif
40
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060041if get_option('requester-api').enabled()
42 headers += [
43 'requester/pldm.h'
44 ]
45 sources += [
46 'requester/pldm.c'
47 ]
48 libpldm_headers += ['requester']
49endif
50
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050051install_headers(
52 headers,
53 subdir: 'libpldm')
54
55libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050056 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050057 sources,
58 implicit_include_directories: false,
59 include_directories: include_directories(libpldm_headers),
60 version: meson.project_version(),
61 install: true)
62
Patrick Williams6f4479c2021-04-16 21:39:44 -050063libpldm_dep = declare_dependency(
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050064 include_directories: include_directories(libpldm_headers),
65 link_with: libpldm)
66
67import('pkgconfig').generate(
68 name: 'libpldm',
69 description: 'PLDM protocol encode/decode C lib',
70 version: meson.project_version(),
71 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080072
73if get_option('tests').enabled()
74 subdir('tests')
75endif