diff -r e14a1aba4c56 -r b1fbfab67908 Makefile --- a/Makefile Wed Feb 23 08:47:59 2000 +0100 +++ b/Makefile Wed Apr 19 22:03:38 2000 +0200 @@ -1,38 +1,13 @@ -# -# libtu Makefile -# - -# Where to install? ($PREFIX/lib/libtu.a, $PREFIX/include/libtu/) -# -PREFIX=/usr/local - -# Any extra defines needed -# -#DEFINES= +## +## libtu Makefile +## -# Any extra include paths needed -# -#INCLUDES= - -###################################### - -WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ - -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized \ - -Wparentheses -pedantic-errors - -CC_FLAGS=-g -O2 -ansi $(DEFINES) $(INCLUDES) $(WARN) -CC=gcc -AR=ar -AR_FLAGS=crs - -INSTALL=install -MODE=644 +# System-specific configuration is in system.mk +include system.mk ###################################### OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o - -DEPEND= .depend LIBDIR=$(PREFIX)/lib INCDIR=$(PREFIX)/include/libtu @@ -42,7 +17,9 @@ ###################################### -all: $(TARGETS) +include rules.mk + +###################################### testers: $(TESTERS) @@ -52,24 +29,9 @@ %: %.c libtu.a $(CC) $(CC_FLAGS) $+ -L. -ltu -lm -o $@ -%.o: %.c - $(CC) $(CC_FLAGS) -c $< -o $@ - -clean: - rm -f $(OBJS) $(DEPEND) - -realclean: clean - rm -f $(TARGETS) - -depend: - $(CC) -M $(CC_FLAGS) *.c > $(DEPEND) - -install: +_install: $(INSTALL) -d $(LIBDIR) $(INSTALL) -d $(INCDIR) - $(INSTALL) -m $(MODE) libtu.a $(LIBDIR) - $(INSTALL) -m $(MODE) include/* $(INCDIR) + $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) + $(INSTALL) -m $(DATA_MODE) include/*.h $(INCDIR) -ifeq ($(DEPEND),$(wildcard $(DEPEND))) -include $(DEPEND) -endif