Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 1 | ACLOCAL_AMFLAGS = -I m4 |
| 2 | |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 3 | lib_LTLIBRARIES = libmctp.la |
Jeremy Kerr | c7e764a | 2019-05-28 16:49:03 +0800 | [diff] [blame] | 4 | libmctp_la_SOURCES = core.c alloc.c log.c \ |
Wiktor GoĊgowski | ba6727e | 2020-03-13 18:25:01 +0100 | [diff] [blame] | 5 | libmctp-alloc.h libmctp-log.h \ |
| 6 | libmctp-cmds.h |
Jeremy Kerr | 8682ef2 | 2019-05-30 17:46:44 +0800 | [diff] [blame] | 7 | include_HEADERS = libmctp.h |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 8 | |
| 9 | if LIBMCTP_BINDING_serial |
Jeremy Kerr | 8682ef2 | 2019-05-30 17:46:44 +0800 | [diff] [blame] | 10 | libmctp_la_SOURCES += serial.c |
| 11 | include_HEADERS += libmctp-serial.h |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 12 | endif |
| 13 | |
| 14 | if LIBMCTP_BINDING_astlpc |
Andrew Jeffery | eba19a3 | 2021-03-09 23:09:40 +1030 | [diff] [blame] | 15 | libmctp_la_SOURCES += astlpc.c crc32.c |
Jeremy Kerr | 8682ef2 | 2019-05-30 17:46:44 +0800 | [diff] [blame] | 16 | include_HEADERS += libmctp-astlpc.h |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 17 | endif |
| 18 | |
Xiaochao Ma | 1e496c8 | 2020-01-16 17:19:11 +0800 | [diff] [blame] | 19 | if HAVE_SYSTEMD |
| 20 | systemdsystemunit_DATA = \ |
Andrew Jeffery | d4103f8 | 2021-06-16 14:39:36 +0930 | [diff] [blame] | 21 | systemd/system/mctp-demux.service \ |
| 22 | systemd/system/mctp-demux.socket |
Xiaochao Ma | 1e496c8 | 2020-01-16 17:19:11 +0800 | [diff] [blame] | 23 | endif |
| 24 | |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 25 | bin_PROGRAMS = utils/mctp-demux-daemon |
Brad Bishop | 983cc3f | 2021-11-30 14:07:03 -0500 | [diff] [blame] | 26 | noinst_PROGRAMS = utils/mctp-in utils/mctp-pipe |
Andrew Jeffery | cad4730 | 2021-08-20 21:37:57 +0930 | [diff] [blame] | 27 | utils_mctp_demux_daemon_SOURCES = utils/mctp-demux-daemon.c |
| 28 | if HAVE_PCAP |
| 29 | utils_mctp_demux_daemon_SOURCES += utils/mctp-capture.c |
| 30 | endif |
| 31 | utils_mctp_demux_daemon_LDADD = libmctp.la $(pcap_LIBS) |
| 32 | utils_mctp_demux_daemon_CFLAGS = $(pcap_CFLAGS) |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 33 | |
Jeremy Kerr | 80971f8 | 2019-08-29 09:57:58 +0530 | [diff] [blame] | 34 | pkgconfig_DATA = libmctp.pc |
| 35 | |
Andrew Jeffery | 7344ac2 | 2020-01-10 16:13:07 +1030 | [diff] [blame] | 36 | if AUTOCONF_CODE_COVERAGE_2019_01_06 |
| 37 | include $(top_srcdir)/aminclude_static.am |
| 38 | clean-local: code-coverage-clean |
| 39 | distclean-local: code-coverage-dist-clean |
| 40 | else |
| 41 | @CODE_COVERAGE_RULES@ |
| 42 | endif |
| 43 | |
| 44 | AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) |
| 45 | AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) |
| 46 | AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS) |
| 47 | |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 48 | TESTS = $(check_PROGRAMS) |
| 49 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 50 | check_PROGRAMS = tests/test_eid tests/test_seq tests/test_bridge \ |
Sumanth Bhat | 69f545f | 2021-05-18 09:16:43 +0000 | [diff] [blame] | 51 | tests/test_astlpc tests/test_serial tests/test_cmds \ |
| 52 | tests/test_core |
Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 53 | # We set a global LDADD here, as there's no way to specify it for all |
| 54 | # tests. This means other targets' LDADDs need to be overridden. |
| 55 | LDADD = tests/libtest-utils.a libmctp.la |
| 56 | |
| 57 | noinst_LIBRARIES = tests/libtest-utils.a |
| 58 | |
| 59 | tests_libtest_utils_a_SOURCES = tests/test-utils.c tests/test-utils.h |
Andrew Jeffery | 8d53b1c | 2020-05-29 08:43:04 +0930 | [diff] [blame] | 60 | |
| 61 | @VALGRIND_CHECK_RULES@ |