X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/4c26bf2ba940b3a7bcb10b9a60e863c2c918efb8..912c70abe824cf6a99fc3db98f3550f570e6d83c:/vars.am diff --git a/vars.am b/vars.am index b0cd53ce..69154072 100644 --- a/vars.am +++ b/vars.am @@ -27,11 +27,6 @@ ###-------------------------------------------------------------------------- ### Miscellaneous useful definitions. -## Some convenient abbreviations for file suffixes. -e = $(EXEEXT) -o = $(OBJEXT) -t = t$e - ## Installation directories. archincludedir = $(pkglibdir)/include @@ -95,7 +90,9 @@ SUBST = $(V_SUBST)$(confsubst) CATACOMB_INCLUDES = \ -I$(top_srcdir) \ - -I$(precomp) \ + -I$(precomp)/math \ + -I$(precomp)/misc \ + -I$(precomp)/symm \ -I$(top_srcdir)/base \ -I$(top_srcdir)/key \ -I$(top_srcdir)/math \ @@ -111,13 +108,26 @@ AM_CPPFLAGS = $(CATACOMB_INCLUDES) ###-------------------------------------------------------------------------- ### Testing. -SUFFIXES += .c .$t .to +TEST_EXTENSIONS = .t +SUFFIXES += .c .t$(EXEEXT) .to + +## This unpleasant duplication of rules makes the build system basically work +## for non-GNU make(1) variants, while GNU Make will associate useful +## additional dependencies with the test programs. GNU Make seems not to +## mind the duplicate rules, and uses the second (better) set; non-GNU Make +## will think the second set refer to bizarrely-named targets which nobody is +## apparently interested in. .c.to: $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@ -.to.$t: +.to.t$(EXEEXT): $(AM_V_CCLD)$(LINK) $< $(TEST_LIBS) $(top_builddir)/libcatacomb.la \ $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS) +%.to: %.c %.lo + $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@ +%.t$(EXEEXT): %.to $(TEST_LIBS) $(top_builddir)/libcatacomb.la + $(AM_V_CCLD)$(LINK) $+ $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS) + .PRECIOUS: %.to -CLEANFILES += *.to *.$t +CLEANFILES += *.to *.t$(EXEEXT) ###----- That's all, folks --------------------------------------------------