blob: e91e13c9a7ec8da802aa7a929a341fac88103160 [file] [log] [blame]
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +08001ACLOCAL_AMFLAGS = -I m4
2
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +08003lib_LTLIBRARIES = libmctp.la
Jeremy Kerrc7e764a2019-05-28 16:49:03 +08004libmctp_la_SOURCES = core.c alloc.c log.c \
Wiktor GoĊ‚gowskiba6727e2020-03-13 18:25:01 +01005 libmctp-alloc.h libmctp-log.h \
6 libmctp-cmds.h
Jeremy Kerr8682ef22019-05-30 17:46:44 +08007include_HEADERS = libmctp.h
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +08008
9if LIBMCTP_BINDING_serial
Jeremy Kerr8682ef22019-05-30 17:46:44 +080010libmctp_la_SOURCES += serial.c
11include_HEADERS += libmctp-serial.h
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +080012endif
13
14if LIBMCTP_BINDING_astlpc
Andrew Jefferyeba19a32021-03-09 23:09:40 +103015libmctp_la_SOURCES += astlpc.c crc32.c
Jeremy Kerr8682ef22019-05-30 17:46:44 +080016include_HEADERS += libmctp-astlpc.h
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +080017endif
18
Xiaochao Ma1e496c82020-01-16 17:19:11 +080019if HAVE_SYSTEMD
20systemdsystemunit_DATA = \
Andrew Jefferyd4103f82021-06-16 14:39:36 +093021 systemd/system/mctp-demux.service \
22 systemd/system/mctp-demux.socket
Xiaochao Ma1e496c82020-01-16 17:19:11 +080023endif
24
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +080025bin_PROGRAMS = utils/mctp-demux-daemon
Andrew Jefferycad47302021-08-20 21:37:57 +093026utils_mctp_demux_daemon_SOURCES = utils/mctp-demux-daemon.c
27if HAVE_PCAP
28utils_mctp_demux_daemon_SOURCES += utils/mctp-capture.c
29endif
30utils_mctp_demux_daemon_LDADD = libmctp.la $(pcap_LIBS)
31utils_mctp_demux_daemon_CFLAGS = $(pcap_CFLAGS)
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +080032
Jeremy Kerr80971f82019-08-29 09:57:58 +053033pkgconfig_DATA = libmctp.pc
34
Andrew Jeffery745b1d12021-05-11 11:14:53 +093035if LIBMCTP_UDEV_RAW_KCS
36udevrules_DATA = udev/rules.d/mctp0-raw-kcs3.rules \
37 udev/rules.d/mctp0-raw-kcs4.rules
38endif
39
Andrew Jeffery7344ac22020-01-10 16:13:07 +103040if AUTOCONF_CODE_COVERAGE_2019_01_06
41include $(top_srcdir)/aminclude_static.am
42clean-local: code-coverage-clean
43distclean-local: code-coverage-dist-clean
44else
45@CODE_COVERAGE_RULES@
46endif
47
48AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
49AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
50AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
51
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +080052TESTS = $(check_PROGRAMS)
53
Andrew Jeffery0247c732020-02-06 11:48:52 +103054check_PROGRAMS = tests/test_eid tests/test_seq tests/test_bridge \
Sumanth Bhat69f545f2021-05-18 09:16:43 +000055 tests/test_astlpc tests/test_serial tests/test_cmds \
56 tests/test_core
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +080057# We set a global LDADD here, as there's no way to specify it for all
58# tests. This means other targets' LDADDs need to be overridden.
59LDADD = tests/libtest-utils.a libmctp.la
60
61noinst_LIBRARIES = tests/libtest-utils.a
62
63tests_libtest_utils_a_SOURCES = tests/test-utils.c tests/test-utils.h
Andrew Jeffery8d53b1c2020-05-29 08:43:04 +093064
65@VALGRIND_CHECK_RULES@