Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 1 | headers = [ |
| 2 | 'base.h', |
| 3 | 'pldm_types.h', |
| 4 | 'platform.h', |
| 5 | 'bios.h', |
John Wang | 0270040 | 2019-10-06 16:34:29 +0800 | [diff] [blame] | 6 | 'bios_table.h', |
Tom Joseph | d64a1dd | 2020-06-23 14:30:37 +0530 | [diff] [blame] | 7 | 'entity.h', |
Deepak Kodihalli | 8bf521f | 2020-07-21 12:39:04 +0000 | [diff] [blame] | 8 | 'states.h', |
Tom Joseph | c4bcc1f | 2020-06-23 15:48:25 +0530 | [diff] [blame] | 9 | 'state_set.h', |
Jinu Joy Thomas | 8e92c6c | 2019-08-06 12:22:34 +0530 | [diff] [blame] | 10 | 'fru.h', |
Dhruvaraj Subhashchandran | 442210e | 2020-03-25 00:54:13 -0500 | [diff] [blame] | 11 | 'utils.h', |
gokulsanker | 138ceba | 2021-04-05 13:25:25 +0530 | [diff] [blame] | 12 | 'pdr.h', |
| 13 | 'firmware_update.h' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 14 | ] |
| 15 | |
| 16 | sources = [ |
| 17 | 'base.c', |
| 18 | 'platform.c', |
Jinu Joy Thomas | 8e92c6c | 2019-08-06 12:22:34 +0530 | [diff] [blame] | 19 | 'bios.c', |
John Wang | 0270040 | 2019-10-06 16:34:29 +0800 | [diff] [blame] | 20 | 'bios_table.c', |
Jinu Joy Thomas | 8e92c6c | 2019-08-06 12:22:34 +0530 | [diff] [blame] | 21 | 'fru.c', |
Deepak Kodihalli | 3b02ed8 | 2020-02-06 01:18:25 -0600 | [diff] [blame] | 22 | 'utils.c', |
gokulsanker | 138ceba | 2021-04-05 13:25:25 +0530 | [diff] [blame] | 23 | 'pdr.c', |
| 24 | 'firmware_update.c' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 25 | ] |
| 26 | |
| 27 | libpldm_headers = ['.', '..'] |
| 28 | |
| 29 | if get_option('oem-ibm').enabled() |
| 30 | headers += [ |
Manojkiran Eda | 998dc4e | 2022-07-28 08:18:03 +0530 | [diff] [blame] | 31 | 'oem/ibm/libpldm/entity_oem_ibm.h', |
| 32 | 'oem/ibm/libpldm/file_io.h', |
| 33 | 'oem/ibm/libpldm/host.h', |
| 34 | 'oem/ibm/libpldm/platform_oem_ibm.h', |
| 35 | 'oem/ibm/libpldm/state_set_oem_ibm.h' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 36 | ] |
| 37 | sources += [ |
Manojkiran Eda | 998dc4e | 2022-07-28 08:18:03 +0530 | [diff] [blame] | 38 | 'oem/ibm/libpldm/file_io.c', |
| 39 | 'oem/ibm/libpldm/host.c', |
| 40 | 'oem/ibm/libpldm/platform_oem_ibm.c' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 41 | ] |
Manojkiran Eda | 998dc4e | 2022-07-28 08:18:03 +0530 | [diff] [blame] | 42 | libpldm_headers += ['oem/ibm'] |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 43 | endif |
| 44 | |
Deepak Kodihalli | 9d494bb | 2019-11-05 01:28:43 -0600 | [diff] [blame] | 45 | if get_option('requester-api').enabled() |
| 46 | headers += [ |
| 47 | 'requester/pldm.h' |
| 48 | ] |
| 49 | sources += [ |
| 50 | 'requester/pldm.c' |
| 51 | ] |
| 52 | libpldm_headers += ['requester'] |
| 53 | endif |
| 54 | |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 55 | install_headers( |
| 56 | headers, |
| 57 | subdir: 'libpldm') |
| 58 | |
| 59 | libpldm = library( |
Deepak Kodihalli | 535efa0 | 2019-10-08 11:52:42 -0500 | [diff] [blame] | 60 | 'pldm', |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 61 | sources, |
| 62 | implicit_include_directories: false, |
| 63 | include_directories: include_directories(libpldm_headers), |
| 64 | version: meson.project_version(), |
| 65 | install: true) |
| 66 | |
Patrick Williams | 6f4479c | 2021-04-16 21:39:44 -0500 | [diff] [blame] | 67 | libpldm_dep = declare_dependency( |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 68 | include_directories: include_directories(libpldm_headers), |
| 69 | link_with: libpldm) |
| 70 | |
| 71 | import('pkgconfig').generate( |
| 72 | name: 'libpldm', |
| 73 | description: 'PLDM protocol encode/decode C lib', |
| 74 | version: meson.project_version(), |
| 75 | libraries: libpldm) |
Lei YU | f357b5a | 2020-02-27 11:52:39 +0800 | [diff] [blame] | 76 | |
| 77 | if get_option('tests').enabled() |
| 78 | subdir('tests') |
| 79 | endif |