X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/6209008bc9868081c17c253886fa20b3bf4b861b..b28bc23d23edd0677b7b16c6cb20be53a621ecb0:/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile index 1f92d8e..9f5eaf7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -20,18 +20,42 @@ ALLMODULES := $(sort $(AGEDU_MODULES)) ALLOBJS := $(patsubst %,%.o,$(ALLMODULES)) ALLDEPS := $(patsubst %,%.d,$(ALLMODULES)) -binaries: agedu +BINARIES = agedu -agedu: $(AGEDU_OBJS) +binaries: $(BINARIES) + +agedu: config.h $(AGEDU_OBJS) gcc $(LFLAGS) -o agedu $(AGEDU_OBJS) +config.h: configure + ./configure -q + rm -f Makefile # we keep using _this_ Makefile + +configure: configure.ac + aclocal + autoconf + autoheader + automake -a --foreign + INTERNALFLAGS=# $(ALLOBJS): %.o: %.c gcc $(CFLAGS) -MM $*.c > $*.d gcc $(CFLAGS) $(INTERNALFLAGS) -c $*.c +MANPAGES = agedu.1 + +doc: $(MANPAGES) +$(MANPAGES): %.1: %.but + halibut --man=$*.1 $*.but + clean: - rm -f agedu $(ALLOBJS) $(ALLDEPS) + rm -f $(ALLOBJS) $(ALLDEPS) $(MANPAGES) $(BINARIES) + +spotless: clean + rm -f config.h config.h.in config.log config.status configure + rm -f depcomp install-sh missing stamp-h1 + rm -f Makefile.in aclocal.m4 + rm -rf autom4te.cache .deps -include $(ALLDEPS)