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