fix pretty printing and make commandline interface
[ccc.git] / Makefile
index 7cd4c61..05c5649 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,14 @@
 CFLAGS+=-Wall -Wextra -std=c99 -pedantic -D_XOPEN_SOURCE=700 -ggdb
-YFLAGS+=-Wall -Wno-empty-rule -Wyacc -Wdangling-alias -d --locations
-LFLAGS+=-X
+YFLAGS+=-d --locations -v --defines=parse.h
+LFLAGS+=--header-file=scan.h
 
 OBJECTS:=scan.o parse.o ast.o util.o
 
-all: expr
-expr: $(OBJECTS)
-scan.c: scan.l y.tab.h
-y.tab.h: parse.c
+all: splc
+splc: $(OBJECTS)
+scan.c: scan.l parse.h
+parse.h: parse.c
 expr.c: y.tab.h
 
 clean:
-       $(RM) $(OBJECTS) y.tab.h scan.c parse.c expr
+       $(RM) $(OBJECTS) y.output parse.h scan.h scan.c parse.c expr