X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/8656dc507aee9c5dcb3a6ad876565f5fcac425ae..b3d26ee834d9d6aa8bba692f469e22f6edcbb17c:/Makefile.am diff --git a/Makefile.am b/Makefile.am index db7de36..4437953 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## -*-Makefile-*- ## -## $Id: Makefile.am,v 1.46 2004/04/08 01:36:11 mdw Exp $ +## $Id$ ## ## Building the distribution ## @@ -43,14 +43,15 @@ pkglibexec_PROGRAMS = @BRES_LIBEXEC@ EXTRA_PROGRAMS = bres pkginclude_HEADERS = \ - align.h alloc.h arena.h bits.h exc.h macros.h quis.h report.h sub.h \ + align.h alloc.h arena.h bits.h buf.h exc.h macros.h quis.h \ + report.h sub.h \ trace.h track.h unihash.h \ pool.h \ atom.h assoc.h darray.h dstr.h dspool.h hash.h sym.h crc32.h \ env.h fdflags.h fdpass.h fwatch.h lock.h \ bres.h conn.h lbuf.h ident.h pkbuf.h sel.h selbuf.h selpk.h sig.h \ tv.h \ - base64.h hex.h mdwopt.h str.h testrig.h url.h + base64.h base32.h hex.h mdwopt.h str.h testrig.h url.h ## --- Things to put in the library --- @@ -59,29 +60,30 @@ libmLib_la_LDFLAGS = -version-info 2:3:0 ## difference between the first and last numbers is major version. libmLib_la_SOURCES = \ - alloc.c arena.c exc.c quis.c pquis.c report.c sub.c trace.c \ + alloc.c arena.c buf.c exc.c quis.c pquis.c report.c sub.c trace.c \ traceopt.c track.c \ pool.c pool-file.c pool-sub.c \ - atom.c assoc.c darray.c dstr.c dputf.c dspool.c hash.c sym.c \ + atom.c assoc.c buf-dstr.c darray.c dstr.c dputf.c dspool.c hash.c \ + sym.c \ crc32.c crc32-tab.c \ unihash.c unihash-global.c \ env.c fdflags.c fdpass.c fwatch.c lock.c \ @BRES_SOURCE@.c \ conn.c lbuf.c ident.c pkbuf.c sel.c selbuf.c selpk.c sig.c \ tv.c \ - base64.c hex.c mdwopt.c str.c testrig.c url.c + base64.c base32.c hex.c mdwopt.c str.c testrig.c url.c EXTRA_libmLib_la_SOURCES = bres.c bres-adns.c libmLib_la_LIBADD = @DEPLIBS@ BUILT_SOURCES = crc32-tab.c unihash-global.c -crc32-tab.c: crc-mktab +crc32-tab.c: crc-mktab$(EXEEXT) ./crc-mktab \ -p0x04c11db7 -b32 -B8 -r \ -c -scrc32_table -icrc32.h -tuint32 -ocrc32-tab.c.new mv crc32-tab.c.new crc32-tab.c -unihash-global.c: unihash-mkstatic +unihash-global.c: unihash-mkstatic$(EXEEXT) ./unihash-mkstatic \ -c -sunihash_global -iunihash.h -ounihash-global.c.new mv unihash-global.c.new unihash-global.c @@ -89,9 +91,11 @@ unihash-global.c: unihash-mkstatic crc_mktab_SOURCES = \ crc-mktab.c \ mdwopt.c quis.c pquis.c report.c str.c +crc_mktab_CFLAGS = $(AM_CFLAGS) unihash_mkstatic_SOURCES = \ unihash-mkstatic.c \ mdwopt.c quis.c pquis.c report.c str.c unihash.c +unihash_mkstatic_CFLAGS = $(AM_CFLAGS) ## --- Test code --- @@ -99,6 +103,7 @@ noinst_PROGRAMS = da.t sym.t assoc.t bits.t check: \ da.test sym.test assoc.test bits.test base64.test hex.test \ + base32.test \ unihash.test da_t_SOURCES = da-test.c @@ -158,6 +163,19 @@ base64.test: base64.t base64.in base64.ref cmp base64.out $(srcdir)/base64.in @echo "base64 tested OK." +base32.to: base32.c + $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" \ + $(srcdir)/base32.c -o base32.to +base32.t: base32.to base32.o libmLib.la + $(CC) $(CFLAGS) $(LDFLAGS) \ + base32.to .libs/libmLib.a $(LIBS) -o base32.t +base32.test: base32.t base32.in base32.ref + ./base32.t <$(srcdir)/base32.in >base32.out + cmp base32.out $(srcdir)/base32.ref + ./base32.t -d <$(srcdir)/base32.ref >base32.out + cmp base32.out $(srcdir)/base32.in + @echo "base32 tested OK." + hex.to: hex.c $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" \ $(srcdir)/hex.c -o hex.to @@ -179,32 +197,30 @@ unihash.t: unihash.to libmLib.la unihash.to .libs/libmLib.a $(LIBS) -o unihash.t unihash.in: unihash-check.pl perl $(srcdir)/unihash-check.pl >unihash.in.new - mv unihash.in.new unihash.in + mv unihash.in.new $(srcdir)/unihash.in unihash.test: unihash.t unihash.in - ./unihash.t -f unihash.in + ./unihash.t -f $(srcdir)/unihash.in TEST_CLEAN = \ - *.t *.to \ + *.t *.to assoc.out \ da.in da.ref da.out \ sym.in sym.ref sym.out \ - base64.out hex.out unihash.in + base64.out base32.out hex.out unihash.in TEST_DIST = \ da-gtest da-ref \ sym-gtest sym-ref \ bits.in bits-testgen.c \ - base64.in base64.ref hex.in hex.ref + unihash-check.pl unihash.in \ + base64.in base64.ref base32.in base32.ref hex.in hex.ref ## --- Background resolver --- ## ## I must (a) build the standalone version, and (b) inform the client library ## where the standalone version is. -bres$(EXEEXT): bres-stnd.o - $(LINK) -o bres bres-stnd.o $(LIBS) - -bres-stnd.o: $(srcdir)/bres.c - $(COMPILE) -c -DBRES_STANDALONE -o bres-stnd.o $(srcdir)/bres.c +bres_SOURCES = bres.c +bres_CFLAGS = -DBRES_STANDALONE bres.lo: $(srcdir)/bres.c $(LTCOMPILE) -c -DBRES_SERVER="\"$(libexecdir)/$(PACKAGE)/`echo bres|sed '$(transform)'`\"" $(srcdir)/bres.c @@ -216,7 +232,7 @@ install-man: uninstall-man: (cd man && $(MAKE) uninstall-man) -CLEANFILES = $(TEST_CLEAN) crc32-tab.c +CLEANFILES = $(TEST_CLEAN) crc32-tab.c unihash-global.c DISTCLEANFILES = libtool EXTRA_DIST = \ $(TEST_DIST) maninst \