blob: b96503fbcafb37d8f2b659d9a5d5736a97aa7ca7 [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 += [
27 '../oem/ibm/libpldm/file_io.h'
28 ]
29 sources += [
30 '../oem/ibm/libpldm/file_io.c'
31 ]
32 libpldm_headers += ['../oem/ibm']
33endif
34
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060035if get_option('requester-api').enabled()
36 headers += [
37 'requester/pldm.h'
38 ]
39 sources += [
40 'requester/pldm.c'
41 ]
42 libpldm_headers += ['requester']
43endif
44
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050045install_headers(
46 headers,
47 subdir: 'libpldm')
48
49libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050050 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050051 sources,
52 implicit_include_directories: false,
53 include_directories: include_directories(libpldm_headers),
54 version: meson.project_version(),
55 install: true)
56
57libpldm = declare_dependency(
58 include_directories: include_directories(libpldm_headers),
59 link_with: libpldm)
60
61import('pkgconfig').generate(
62 name: 'libpldm',
63 description: 'PLDM protocol encode/decode C lib',
64 version: meson.project_version(),
65 libraries: libpldm)
Lei YUf357b5a2020-02-27 11:52:39 +080066
67if get_option('tests').enabled()
68 subdir('tests')
69endif