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