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 += [ |
George Liu | 9008d28 | 2020-03-12 11:20:35 +0800 | [diff] [blame] | 27 | '../oem/ibm/libpldm/file_io.h', |
| 28 | '../oem/ibm/libpldm/host.h' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 29 | ] |
| 30 | sources += [ |
George Liu | 9008d28 | 2020-03-12 11:20:35 +0800 | [diff] [blame] | 31 | '../oem/ibm/libpldm/file_io.c', |
| 32 | '../oem/ibm/libpldm/host.c' |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 33 | ] |
| 34 | libpldm_headers += ['../oem/ibm'] |
| 35 | endif |
| 36 | |
Deepak Kodihalli | 9d494bb | 2019-11-05 01:28:43 -0600 | [diff] [blame] | 37 | if get_option('requester-api').enabled() |
| 38 | headers += [ |
| 39 | 'requester/pldm.h' |
| 40 | ] |
| 41 | sources += [ |
| 42 | 'requester/pldm.c' |
| 43 | ] |
| 44 | libpldm_headers += ['requester'] |
| 45 | endif |
| 46 | |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 47 | install_headers( |
| 48 | headers, |
| 49 | subdir: 'libpldm') |
| 50 | |
| 51 | libpldm = library( |
Deepak Kodihalli | 535efa0 | 2019-10-08 11:52:42 -0500 | [diff] [blame] | 52 | 'pldm', |
Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 53 | sources, |
| 54 | implicit_include_directories: false, |
| 55 | include_directories: include_directories(libpldm_headers), |
| 56 | version: meson.project_version(), |
| 57 | install: true) |
| 58 | |
| 59 | libpldm = declare_dependency( |
| 60 | include_directories: include_directories(libpldm_headers), |
| 61 | link_with: libpldm) |
| 62 | |
| 63 | import('pkgconfig').generate( |
| 64 | name: 'libpldm', |
| 65 | description: 'PLDM protocol encode/decode C lib', |
| 66 | version: meson.project_version(), |
| 67 | libraries: libpldm) |
Lei YU | f357b5a | 2020-02-27 11:52:39 +0800 | [diff] [blame] | 68 | |
| 69 | if get_option('tests').enabled() |
| 70 | subdir('tests') |
| 71 | endif |