| Priyanga | fb4bec9 | 2019-03-25 11:51:31 +0530 | [diff] [blame] | 1 | AM_CPPFLAGS = -I$(top_srcdir) $(CODE_COVERAGE_CPPFLAGS) | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 2 |  | 
|  | 3 | TESTS = $(check_PROGRAMS) | 
|  | 4 |  | 
|  | 5 | check_PROGRAMS = \ | 
|  | 6 | libpldm_base_test \ | 
| Sampa Misra | 0db1dfa | 2019-03-19 00:15:31 -0500 | [diff] [blame] | 7 | libpldm_platform_test \ | 
| Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 8 | libpldmresponder_base_test \ | 
|  | 9 | libpldm_bios_test \ | 
|  | 10 | libpldmresponder_bios_test | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 11 |  | 
| Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 12 | if OEM_IBM | 
|  | 13 | check_PROGRAMS += \ | 
|  | 14 | libpldmoem_fileio_test \ | 
|  | 15 | libpldmoemresponder_fileio_test | 
|  | 16 | endif | 
|  | 17 |  | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 18 | test_cppflags = \ | 
|  | 19 | -Igtest \ | 
|  | 20 | $(GTEST_CPPFLAGS) \ | 
|  | 21 | $(AM_CPPFLAGS) | 
|  | 22 |  | 
|  | 23 | test_cxxflags = \ | 
| Priyanga | fb4bec9 | 2019-03-25 11:51:31 +0530 | [diff] [blame] | 24 | $(PTHREAD_CFLAGS) \ | 
|  | 25 | $(CODE_COVERAGE_CXXFLAGS) | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 26 |  | 
|  | 27 | test_ldflags = \ | 
|  | 28 | -lgtest_main \ | 
|  | 29 | -lgtest \ | 
|  | 30 | $(PTHREAD_LIBS) \ | 
|  | 31 | $(OESDK_TESTCASE_FLAGS) | 
|  | 32 |  | 
| Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 33 | if OEM_IBM | 
|  | 34 | test_ldflags += \ | 
|  | 35 | $(SDBUSPLUS_LIBS) \ | 
|  | 36 | -lgmock \ | 
|  | 37 | -lstdc++fs | 
|  | 38 | endif | 
|  | 39 |  | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 40 | libpldm_base_test_CPPFLAGS = $(test_cppflags) | 
|  | 41 | libpldm_base_test_CXXFLAGS = $(test_cxxflags) | 
|  | 42 | libpldm_base_test_LDFLAGS = $(test_ldflags) | 
| Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 43 | libpldm_base_test_LDADD = \ | 
|  | 44 | $(top_builddir)/libpldm/libpldm_la-base.o \ | 
|  | 45 | $(CODE_COVERAGE_LIBS) | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 46 | libpldm_base_test_SOURCES = libpldm_base_test.cpp | 
|  | 47 |  | 
| Sampa Misra | 0db1dfa | 2019-03-19 00:15:31 -0500 | [diff] [blame] | 48 | libpldm_platform_test_CPPFLAGS = $(test_cppflags) | 
|  | 49 | libpldm_platform_test_CXXFLAGS = $(test_cxxflags) | 
|  | 50 | libpldm_platform_test_LDFLAGS = $(test_ldflags) | 
|  | 51 | libpldm_platform_test_LDADD = \ | 
|  | 52 | $(top_builddir)/libpldm/libpldm_la-platform.o \ | 
|  | 53 | $(top_builddir)/libpldm/libpldm_la-base.o \ | 
|  | 54 | $(CODE_COVERAGE_LIBS) | 
|  | 55 | libpldm_platform_test_SOURCES = libpldm_platform_test.cpp | 
|  | 56 |  | 
| Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 57 | libpldm_bios_test_CPPFLAGS = $(test_cppflags) | 
|  | 58 | libpldm_bios_test_CXXFLAGS = $(test_cxxflags) | 
|  | 59 | libpldm_bios_test_LDFLAGS = $(test_ldflags) | 
|  | 60 | libpldm_bios_test_LDADD = \ | 
|  | 61 | $(top_builddir)/libpldm/libpldm_la-base.o  \ | 
|  | 62 | $(top_builddir)/libpldm/libpldm_la-bios.o \ | 
|  | 63 | $(CODE_COVERAGE_LIBS) | 
|  | 64 | libpldm_bios_test_SOURCES = libpldm_bios_test.cpp | 
|  | 65 |  | 
|  | 66 | libpldmresponder_bios_test_CPPFLAGS = $(test_cppflags) | 
|  | 67 | libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags) | 
| Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 68 | libpldmresponder_bios_test_LDFLAGS = \ | 
|  | 69 | $(test_ldflags) \ | 
|  | 70 | $(SDBUSPLUS_LIBS) | 
| Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 71 | libpldmresponder_bios_test_LDADD = \ | 
|  | 72 | $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \ | 
|  | 73 | $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \ | 
|  | 74 | $(top_builddir)/libpldm/libpldm_la-base.o  \ | 
|  | 75 | $(top_builddir)/libpldm/libpldm_la-bios.o \ | 
| Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 76 | $(CODE_COVERAGE_LIBS) \ | 
|  | 77 | $(SDBUSPLUS_LIBS) | 
| Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 78 | libpldmresponder_bios_test_SOURCES = \ | 
|  | 79 | libpldmresponder_bios_test.cpp | 
|  | 80 |  | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 81 | libpldmresponder_base_test_CPPFLAGS = $(test_cppflags) | 
|  | 82 | libpldmresponder_base_test_CXXFLAGS = $(test_cxxflags) | 
|  | 83 | libpldmresponder_base_test_LDFLAGS = $(test_ldflags) | 
|  | 84 | libpldmresponder_base_test_LDADD = \ | 
| Priyanga | fb4bec9 | 2019-03-25 11:51:31 +0530 | [diff] [blame] | 85 | $(top_builddir)/libpldm/libpldm_la-base.o \ | 
| Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 86 | $(top_builddir)/libpldmresponder/libpldmresponder_la-base.o \ | 
|  | 87 | $(CODE_COVERAGE_LIBS) | 
| Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 88 | libpldmresponder_base_test_SOURCES = libpldmresponder_base_test.cpp | 
| Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 89 |  | 
|  | 90 | if OEM_IBM | 
|  | 91 | libpldmoem_fileio_test_CPPFLAGS = $(test_cppflags) \ | 
|  | 92 | -I$(top_builddir)/oem/ibm/ \ | 
|  | 93 | -I$(top_builddir)/libpldm/ | 
|  | 94 | libpldmoem_fileio_test_CXXFLAGS = $(test_cxxflags) | 
|  | 95 | libpldmoem_fileio_test_LDFLAGS = $(test_ldflags) | 
|  | 96 | libpldmoem_fileio_test_LDADD = \ | 
|  | 97 | $(top_builddir)/libpldm/libpldm_la-base.o \ | 
|  | 98 | $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o | 
|  | 99 | libpldmoem_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldm_fileio_test.cpp | 
|  | 100 |  | 
|  | 101 | libpldmoemresponder_fileio_test_CPPFLAGS = $(test_cppflags) \ | 
|  | 102 | -I$(top_builddir)/oem/ibm/ \ | 
|  | 103 | -I$(top_builddir)/libpldm/ | 
|  | 104 | libpldmoemresponder_fileio_test_CXXFLAGS = $(test_cxxflags) | 
|  | 105 | libpldmoemresponder_fileio_test_LDFLAGS = $(test_ldflags) | 
|  | 106 | libpldmoemresponder_fileio_test_LDADD = \ | 
|  | 107 | $(top_builddir)/libpldm/libpldm_la-base.o \ | 
|  | 108 | $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o \ | 
|  | 109 | $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_io.o | 
|  | 110 | libpldmoemresponder_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldmresponder_fileio_test.cpp | 
|  | 111 | endif | 
|  | 112 |  |