blob: 63bd8ad7bd1a7c43c3521c19ad806fdf92175082 [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',
John Wangd8702f62019-10-31 10:06:35 +08009 'utils.h'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050010]
11
12sources = [
13 'base.c',
14 'platform.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053015 'bios.c',
John Wang02700402019-10-06 16:34:29 +080016 'bios_table.c',
Jinu Joy Thomas8e92c6c2019-08-06 12:22:34 +053017 'fru.c',
John Wangd8702f62019-10-31 10:06:35 +080018 'utils.c'
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050019]
20
21libpldm_headers = ['.', '..']
22
23if get_option('oem-ibm').enabled()
24 headers += [
25 '../oem/ibm/libpldm/file_io.h'
26 ]
27 sources += [
28 '../oem/ibm/libpldm/file_io.c'
29 ]
30 libpldm_headers += ['../oem/ibm']
31endif
32
Deepak Kodihalli9d494bb2019-11-05 01:28:43 -060033if get_option('requester-api').enabled()
34 headers += [
35 'requester/pldm.h'
36 ]
37 sources += [
38 'requester/pldm.c'
39 ]
40 libpldm_headers += ['requester']
41endif
42
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050043install_headers(
44 headers,
45 subdir: 'libpldm')
46
47libpldm = library(
Deepak Kodihalli535efa02019-10-08 11:52:42 -050048 'pldm',
Deepak Kodihalli3c275e12019-09-21 06:39:39 -050049 sources,
50 implicit_include_directories: false,
51 include_directories: include_directories(libpldm_headers),
52 version: meson.project_version(),
53 install: true)
54
55libpldm = declare_dependency(
56 include_directories: include_directories(libpldm_headers),
57 link_with: libpldm)
58
59import('pkgconfig').generate(
60 name: 'libpldm',
61 description: 'PLDM protocol encode/decode C lib',
62 version: meson.project_version(),
63 libraries: libpldm)