# Makefile.in -- Makefile for libmaa # Created: Sun Nov 19 13:32:41 1995 by faith@dict.org # Revised: Sat Mar 30 11:54:48 2002 by faith@dict.org # Copyright 1995-1998, 2002 Rickard E. Faith (faith@dict.org) # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 1, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 675 Mass Ave, Cambridge, MA 02139, USA. # # $Id: Makefile.in,v 1.52 2006/12/11 10:17:20 cheusov Exp $ # ifneq (,) This makefile requires GNU Make. endif MAA_MAJOR=@MAA_MAJOR@ MAA_MINOR=@MAA_MINOR@ VER=$(MAA_MAJOR).$(MAA_MINOR) VERSION=$(VER).$(shell fgrep Revision version.c \ | head -1 \ | sed 's,^.*Revision: [^.]*.,,' \ | sed 's, $$.*$$,,') .SUFFIXES: .SUFFIXES: .c .o srcdir= @srcdir@ VPATH= @srcdir@ prefix= @prefix@ exec_prefix= @exec_prefix@ libdir= @libdir@ includedir= @includedir@ subdirs= @subdirs@ doc SHELL= /bin/sh CC= @CC@ CPP= @CPP@ INSTALL= @INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA= @INSTALL_DATA@ AWK= @AWK@ VERCFLAGS= -DMAA_MAJOR=$(MAA_MAJOR) -DMAA_MINOR=$(MAA_MINOR) CFLAGS= @DEFS@ @CPPFLAGS@ @CFLAGS@ $(VERCFLAGS) -I. LDFLAGS= @LDFLAGS@ @LIBS@ .libs/libmaa.a -lm RPATHFLAGS= @RPATHFLAGS@ HEADERS= config.h maa.h maaP.h obstack.h LIBOBJS= @LIBOBJS@ obstack.o \ hash.o set.o stack.o list.o error.o memory.o string.o \ debug.o flags.o maa.o prime.o bit.o timer.o version.o \ arg.o pr.o sl.o base64.o base26.o source.o parse-concrete.o \ text.o log.o TESTS= settest hashtest stringtest debugtest \ primetest listtest bittest argtest sltest prtest basetest EXES= memtest prtest LIBS= @TARGETLIBS@ lib: $(LIBS) all: $(LIBS) $(EXES) $(TESTS) echo making $@ in doc; \ (cd doc && $(MAKE) $@) || exit 1; install: $(LIBS) mkdir -p $(libdir) && \ libtool --mode=install $(INSTALL) -c libmaa.la $(libdir) mkdir -p $(includedir) && \ $(INSTALL_DATA) -m 644 maa.h $(includedir) uninstall: rm -f $(includedir)/maa.h libtool --mode=uninstall rm -f $(libdir)/libmaa.la tests: $(TESTS) @for i in $(TESTS); do \ ./$$i | fgrep -v ' at ' > ./$$i.out.new; \ if cmp ./$$i.out $$i.out.new; \ then echo PASSED $$i; rm -f $$i.out.new; \ else echo FAILED $$i; \ fi; \ done tests-update: $(TESTS) @for i in $(TESTS); do \ echo Writing $$i.out; \ ./$$i | fgrep -v ' at ' > $$i.out; \ done arg.o: arggram.c arggram.c: arggram.txt @AWK@ -f ./arggram2c < $< > $@ %.o: %.c libtool --mode=compile $(CC) -o $@ -c $(CFLAGS) $< %: %.o libtool --mode=link $(CC) -o $@ $< $(LDFLAGS) %test: %test.c rnd.o $(CC) $(CFLAGS) $(RPATHFLAGS) -o $@ $< rnd.o $(LDFLAGS) dmalloc/dmalloc.h: echo making all in dmalloc (cd dmalloc && $(MAKE) all) || exit 1 libmaa.a: $(LIBOBJS) libtool --mode=link ${CC} -o libmaa.la ${LIBOBJS:.o=.lo} \ -rpath "${libdir}" \ -version-info "$(MAA_MAJOR):$(MAA_MINOR)" $(LIBOBJS): $(HEADERS) # version.stamp # don't automatically bump version $(EXES): $(HEADERS) $(LIBS) $(TESTS): $(HEADERS) $(LIBS) rnd.o date := $(shell date) version.stamp: version.c cp version.c version.tmp echo "/* Stamp: `date` */" > version.c fgrep Revision < version.tmp | tail -1 >> version.c touch version.stamp -rm -f version.tmp version.c: echo "/* Stamp: `date` */" > version.c echo 'const char *maa_revision_string = "XRevisionX";' | \ sed 's/X/$$/g' >> version.c .PHONY: ChangeLog ChangeLog: (echo "***** Making new ChangeLog..."; \ rm -f ChangeLog; \ AWK=@AWK@ rcs2log -i 2 > ChangeLog) dist: ChangeLog @( echo "Consider making version.stamp to bump version number"; \ CVSROOT=`cat CVS/Root`; \ export CVSROOT; \ VERSION=$(MAA_MAJOR).$(MAA_MINOR).`fgrep Revision version.c \ | head -1 \ | sed 's,^.*Revision: [^.]*.,,' \ | sed 's, $$.*$$,,'`; \ export VERSION; \ echo "***** Copying ChangeLog for libmaa-$${VERSION}..."; \ cp ChangeLog /tmp; \ echo "***** Exporting files for libmaa-$${VERSION}..."; \ cd /tmp; \ rm -rf /tmp/libmaa-$${VERSION}; \ cvs export -fNd libmaa-$${VERSION} -r HEAD libmaa; \ cd libmaa-$${VERSION}; \ autoconf; \ mv ../ChangeLog .; \ cd ..; \ echo "***** Taring and zipping libmaa-$${VERSION}.tar.gz..."; \ tar cvvf libmaa-$${VERSION}.tar libmaa-$${VERSION}; \ gzip -9 libmaa-$${VERSION}.tar; \ echo "***** Done making /tmp/libmaa-$${VERSION}.tar.gz") .PHONY: clean cleandist tags clean: @for subdir in `echo $(subdirs)`; do \ echo making $@ in $$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done -rm -rf .libs -rm -f *~ *.la *.lo *.o core a.out config.log $(TESTS) $(EXES) -rm -f $(LIBS) arggram.c -rm -f *.log *.aux *.toc *.dvi *.ps *.out.new -rm -f *.cfg *.dtk .inslog tca.map .pure -rm -f version.stamp version.tmp mkrnd distclean: clean @for subdir in `echo $(subdirs)`; do \ echo making $@ in $$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done -rm -f config.h config.cache config.status stamp-h.in stamp-h -rm -f Makefile -rm -rf autom4te.cache tags: etags: *.c # The following is based on the "Automatic Remaking" node in the GNU # Autoconf documentation: $(srcdir)/configure: configure.in cd $(srcdir) && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: stamp-h.in ${srcdir}/stamp-h.in: configure.in cd ${srcdir} && autoheader date > ${srcdir}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status ./config.status Makefile: Makefile.in config.status ./config.status config.status: configure ./config.status --recheck