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 += [ |
George Liu | 9008d28 | 2020-03-12 11:20:35 +0800 | [diff] [blame] | 31 | '../oem/ibm/libpldm/file_io.h', |
Tom Joseph | 7f839f9 | 2020-09-21 10:20:44 +0530 | [diff] [blame] | 32 | '../oem/ibm/libpldm/host.h', |
Eddie James | bbbbae1 | 2021-10-14 09:24:23 -0500 | [diff] [blame] | 33 | '../oem/ibm/libpldm/platform_oem_ibm.h', |
| 34 | '../oem/ibm/libpldm/state_set_oem_ibm.h' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 35 | ] |
| 36 | sources += [ |
George Liu | 9008d28 | 2020-03-12 11:20:35 +0800 | [diff] [blame] | 37 | '../oem/ibm/libpldm/file_io.c', |
Tom Joseph | 7f839f9 | 2020-09-21 10:20:44 +0530 | [diff] [blame] | 38 | '../oem/ibm/libpldm/host.c', |
| 39 | '../oem/ibm/libpldm/platform_oem_ibm.c' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 40 | ] |
| 41 | libpldm_headers += ['../oem/ibm'] |
| 42 | endif |
| 43 | |
Deepak Kodihalli | 9d494bb | 2019-11-05 01:28:43 -0600 | [diff] [blame] | 44 | if get_option('requester-api').enabled() |
| 45 | headers += [ |
| 46 | 'requester/pldm.h' |
| 47 | ] |
| 48 | sources += [ |
| 49 | 'requester/pldm.c' |
| 50 | ] |
| 51 | libpldm_headers += ['requester'] |
| 52 | endif |
| 53 | |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 54 | install_headers( |
| 55 | headers, |
| 56 | subdir: 'libpldm') |
| 57 | |
| 58 | libpldm = library( |
Deepak Kodihalli | 535efa0 | 2019-10-08 11:52:42 -0500 | [diff] [blame] | 59 | 'pldm', |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 60 | sources, |
| 61 | implicit_include_directories: false, |
| 62 | include_directories: include_directories(libpldm_headers), |
| 63 | version: meson.project_version(), |
| 64 | install: true) |
| 65 | |
Patrick Williams | 6f4479c | 2021-04-16 21:39:44 -0500 | [diff] [blame] | 66 | libpldm_dep = declare_dependency( |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 67 | include_directories: include_directories(libpldm_headers), |
| 68 | link_with: libpldm) |
| 69 | |
| 70 | import('pkgconfig').generate( |
| 71 | name: 'libpldm', |
| 72 | description: 'PLDM protocol encode/decode C lib', |
| 73 | version: meson.project_version(), |
| 74 | libraries: libpldm) |
Lei YU | f357b5a | 2020-02-27 11:52:39 +0800 | [diff] [blame] | 75 | |
| 76 | if get_option('tests').enabled() |
| 77 | subdir('tests') |
| 78 | endif |