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