blob: 7c072a242457efa58e7e42c28566dca9406b89c9 [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',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -05007 'states.h',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +05308 'fru.h',
Dhruvaraj Subhashchandran442210e2020-03-25 00:54:13 -05009 'utils.h',
10 'pdr.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050011]
12
13sources = [
14 'base.c',
15 'platform.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053016 'bios.c',
John Wang02700402019-10-06 16:34:29 +080017 'bios_table.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053018 'fru.c',
Deepak Kodihalli3b02ed82020-02-06 01:18:25 -060019 'utils.c',
20 'pdr.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050021]
22
23libpldm_headers = ['.', '..']
24
25if get_option('oem-ibm').enabled()
26 headers += [
George Liu9008d282020-03-12 11:20:35 +080027 '../oem/ibm/libpldm/file_io.h',
28 '../oem/ibm/libpldm/host.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050029 ]
30 sources += [
George Liu9008d282020-03-12 11:20:35 +080031 '../oem/ibm/libpldm/file_io.c',
32 '../oem/ibm/libpldm/host.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050033 ]
34 libpldm_headers += ['../oem/ibm']
35endif
36
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060037if get_option('requester-api').enabled()
38 headers += [
39 'requester/pldm.h'
40 ]
41 sources += [
42 'requester/pldm.c'
43 ]
44 libpldm_headers += ['requester']
45endif
46
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050047install_headers(
48 headers,
49 subdir: 'libpldm')
50
51libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050052 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050053 sources,
54 implicit_include_directories: false,
55 include_directories: include_directories(libpldm_headers),
56 version: meson.project_version(),
57 install: true)
58
59libpldm = declare_dependency(
60 include_directories: include_directories(libpldm_headers),
61 link_with: libpldm)
62
63import('pkgconfig').generate(
64 name: 'libpldm',
65 description: 'PLDM protocol encode/decode C lib',
66 version: meson.project_version(),
67 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080068
69if get_option('tests').enabled()
70 subdir('tests')
71endif