summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-07-31 17:33:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-07-31 17:40:55 -0700
commit0b38bc996c4c7e2693931bbd5103c7772b56b4bd (patch)
tree8e74fd6b7efc3a0fb87037b2bb58b9d8c6129339 /Makefile
parent2f5e7a5b96039b7a00543b4056bab7ec85c8db4b (diff)
downloadtxr-0b38bc996c4c7e2693931bbd5103c7772b56b4bd.tar.gz
txr-0b38bc996c4c7e2693931bbd5103c7772b56b4bd.tar.bz2
txr-0b38bc996c4c7e2693931bbd5103c7772b56b4bd.zip
txr-015 2009-10-15txr-015
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 12 insertions, 16 deletions
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)