chiark / gitweb /
Add a couple more standard macros. Fix the header.
[mLib] / Makefile.am
index db7de366aaf41b6c1c5c8e3a563f72cb9933cb14..e775c5745987333bd3dda6c98308ba7ee621d814 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-Makefile-*-
 ##
-## $Id: Makefile.am,v 1.46 2004/04/08 01:36:11 mdw Exp $
+## $Id$
 ##
 ## Building the distribution
 ##
@@ -50,7 +50,7 @@ pkginclude_HEADERS = \
        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 ---
 
@@ -69,7 +69,7 @@ libmLib_la_SOURCES = \
        @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@
 
@@ -99,6 +99,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 +159,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,21 +193,22 @@ 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 \
        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 ---
 ##