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