From 0b38bc996c4c7e2693931bbd5103c7772b56b4bd Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 31 Jul 2017 17:33:59 -0700 Subject: txr-015 2009-10-15 --- Makefile | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d4fd87d4..b36dc41f 100644 --- a/Makefile +++ b/Makefile @@ -25,40 +25,36 @@ # Test data in the tests/ directory is in the public domain, # unless it contains notices to the contrary. + OPT_FLAGS := -O2 LANG_FLAGS := -ansi -D_GNU_SOURCE DIAG_FLAGS := -Wall DBG_FLAGS := -g +LEX_DBG_FLAGS := TXR_DBG_OPTS := --gc-debug LEXLIB := fl CFLAGS := $(LANG_FLAGS) $(DIAG_FLAGS) $(OPT_FLAGS) $(DBG_FLAGS) -txr: lex.yy.o y.tab.o lib.o regex.o gc.o unwind.o +OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o +txr: $(OBJS) $(CC) $(CFLAGS) -o $@ $^ -l$(LEXLIB) -lex.yy.o y.tab.o: y.tab.h extract.h lib.h gc.h - -y.tab.o: regex.h - -lib.o: lib.h gc.h - -regex.o: regex.h lib.h gc.h +-include dep.mk -gc.o: gc.h lib.h gc.h +lex.yy.c: parser.l + $(LEX) $(LEX_DBG_FLAGS) $< -unwind.o: unwind.h lib.h - -lex.yy.c: extract.l - $(LEX) $< - -y.tab.c y.tab.h: extract.y +y.tab.c y.tab.h: parser.y if $(YACC) -v -d $< ; then true ; else rm $@ ; false ; fi clean: - rm -f txr lex.yy.o y.tab.o lib.o regex.o gc.o unwind.o \ + rm -f txr $(OBJS) \ y.tab.c lex.yy.c y.tab.h y.output $(TESTS:.ok=.out) +depend: txr + ./txr depend.txr > dep.mk + TESTS := $(patsubst %.txr,%.ok,$(shell find tests -name '*.txr' | sort)) tests: txr $(TESTS) -- cgit v1.2.3