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