--- Makefile.orig 2010-08-16 23:59:45.463692224 +1200 +++ Makefile 2010-08-17 00:00:45.069692939 +1200 @@ -1,11 +1,11 @@ srcdir :=$(shell pwd) -CFLAGS= -O +CFLAGS?= -O fixed-flags = -I$(srcdir) -I$(srcdir)/box all-C-flags:= -ansi $(fixed-flags) $(CFLAGS) non-ansi-flags := $(fixed-flags) $(CFLAGS) -CC = gcc # some compiler for ANSI/ISO C +CC ?= gcc # some compiler for ANSI/ISO C # These settings should also be used in subdirectories: export CC all-C-flags fixed-flags CFLAGS @@ -49,9 +49,7 @@ # To 'make all', we first descend into the subdirectories, and afterwards # return to finish here. -all: - $(MAKE) math_functions binding_functions - $(MAKE) finish +all: math_functions binding_functions finish finish: lie Lie.exe LEARN.ind INFO.ind # do not call 'make finish' directly @@ -98,12 +96,12 @@ # been set to the most recent one of object files in the respective # subdirectories, whence taking that dummy file as dependency suffices. -date.o: date.c $(objects) box/.last_compiled static/.last_compiled +date.o: date.c $(objects) math_functions binding_functions $(CC) -ansi -c date.c -gapdate.o: date.c $(GAP_objects) box/.last_compiled static/.last_compiled +gapdate.o: date.c $(GAP_objects) math_functions binding_functions $(CC) -ansi -c -o gapdate.o date.c -Lie.exe: date.o +Lie.exe: math_functions binding_functions date.o $(CC) -o Lie.exe $(LDFLAGS) $(objects) date.o static/*.o box/*.o -lreadline -lncurses chmod g+w Lie.exe Liegap.exe: gapdate.o @@ -131,7 +129,7 @@ learnind: util/learnind.c $(MAKE) -C util ../learnind -INFO.a: progs/maxsub progs/maxsub0 progs/eqrank +INFO.a: Lie.exe progs/maxsub progs/maxsub0 progs/eqrank rm -f INFO.a ./Lie.exe < progs/maxsub