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 | |
Deepak Kodihalli | 9d494bb | 2019-11-05 01:28:43 -0600 | [diff] [blame] | 33 | if get_option('requester-api').enabled() |
| 34 | headers += [ |
| 35 | 'requester/pldm.h' |
| 36 | ] |
| 37 | sources += [ |
| 38 | 'requester/pldm.c' |
| 39 | ] |
| 40 | libpldm_headers += ['requester'] |
| 41 | endif |
| 42 | |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 43 | install_headers( |
| 44 | headers, |
| 45 | subdir: 'libpldm') |
| 46 | |
| 47 | libpldm = library( |
Deepak Kodihalli | 535efa0 | 2019-10-08 11:52:42 -0500 | [diff] [blame] | 48 | 'pldm', |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 49 | sources, |
| 50 | implicit_include_directories: false, |
| 51 | include_directories: include_directories(libpldm_headers), |
| 52 | version: meson.project_version(), |
| 53 | install: true) |
| 54 | |
| 55 | libpldm = declare_dependency( |
| 56 | include_directories: include_directories(libpldm_headers), |
| 57 | link_with: libpldm) |
| 58 | |
| 59 | import('pkgconfig').generate( |
| 60 | name: 'libpldm', |
| 61 | description: 'PLDM protocol encode/decode C lib', |
| 62 | version: meson.project_version(), |
| 63 | libraries: libpldm) |