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