-# Copyright © 2011-2013, 2019-2021 Nick Bowler
+# Copyright © 2011-2013, 2019-2022 Nick Bowler
#
# License WTFPL2: Do What The Fuck You Want To Public License, version 2.
# This is free software: you are free to do what the fuck you want to.
-DBISON_LOCALEDIR=\"$(BISON_LOCALEDIR)\" \
-DLOCALEDIR=\"$(localedir)\"
-AM_CFLAGS = $(GSL_CFLAGS)
-
MAINTAINERCLEANFILES = src/scan.c src/scan.h src/scan.stamp \
src/parse.c src/parse.h src/parse.stamp
$(libmain_a_OBJECTS): $(gnulib_headers)
$(libmain_a_OBJECTS): src/options.h
-check_PROGRAMS = test/crossparse test/normalize
-check_LTLIBRARIES = libtest.la
-libtest_la_LIBADD = $(GSL_LIBS)
-libtest_la_SOURCES = test/testlib.c
-$(libtest_la_OBJECTS): $(gnulib_headers)
+check_PROGRAMS = test/crossparse test/normalize test/randomdecl
+check_LIBRARIES = libtest.a
+libtest_a_SOURCES = test/testlib.c common/src/help.c
+$(libtest_a_OBJECTS): $(gnulib_headers)
-if HAVE_GSL
-libtest_la_SOURCES += test/declgen.c
-check_PROGRAMS += test/randomdecl
-endif
+test_randomdecl_SOURCES = test/randomdecl.c test/declgen.c test/rng.c
+test_randomdecl_LDADD = libtest.a libcdecl.la libgnu.la $(LDEXP_LIBM)
+$(test_randomdecl_OBJECTS): $(gnulib_headers)
-test_crossparse_LDADD = libtest.la libcdecl.la libgnu.la
+test_crossparse_LDADD = libtest.a libcdecl.la libgnu.la
$(test_crossparse_OBJECTS): $(gnulib_headers)
-test_randomdecl_LDADD = libtest.la libcdecl.la libgnu.la
-$(test_randomdecl_OBJECTS): $(gnulib_headers)
-test_normalize_LDADD = libtest.la src/output.lo src/normalize.lo \
+test_normalize_LDADD = libtest.a src/output.lo src/normalize.lo \
libcdecl.la libgnu.la
$(test_normalize_OBJECTS): $(gnulib_headers)
src/scan.lo: src/parse.h
src/parse-decl.lo: src/scan.h src/parse.h src/typemap.h
src/output.lo: src/specstr.h
-test/declgen.lo: test/typegen.h
+test/declgen.$(OBJEXT): test/typegen.h
# Supporting rules for gettext.
include $(top_srcdir)/common/snippet/gettext.mk