config: make it easier to add TEST programs LDADD is a Makefile wide variable. Automake matches prog name with .c file by default Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
diff --git a/test/Makefile.am b/test/Makefile.am
index c4934be..892ab91 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,25 +1,11 @@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS)
+LDADD = $(top_builddir)/src/libxkbcommon.la
TESTS_ENVIRONMENT = $(SHELL)
check_PROGRAMS = xkey filecomp namescomp rulescomp canonicalise
-TESTS = xkey.sh filecomp.sh namescomp.sh rulescomp.sh canonicalise.sh
+TESTS = $(check_PROGRAMS:=.sh)
clean-local:
rm -f *.log
-
-xkey_SOURCES = xkey.c
-xkey_LDADD = $(top_builddir)/src/libxkbcommon.la
-
-rulescomp_SOURCES = rulescomp.c
-rulescomp_LDADD = $(top_builddir)/src/libxkbcommon.la
-
-namescomp_SOURCES = namescomp.c
-namescomp_LDADD = $(top_builddir)/src/libxkbcommon.la
-
-filecomp_SOURCES = filecomp.c
-filecomp_LDADD = $(top_builddir)/src/libxkbcommon.la
-
-canonicalise_SOURCES = canonicalise.c
-canonicalise_LDADD = $(top_builddir)/src/libxkbcommon.la