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