]> mj.ucw.cz Git - umpf.git/blobdiff - Makefile
add arrow and .
[umpf.git] / Makefile
index 32acee5f25c59306bc6297a2a97d1135a5420e6e..549b9b5b76e4b623f54adacd3c3cf561b6fcb3bb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,18 @@
-all: bison
-       gcc -Wall -O2 -o cond cond.tab.c
+all: cond
 
-bison:
-       bison cond.y
+CC=gcc
+CFLAGS=-Wall -W -O2 -g
+LDLIBS=-lpcre
+
+cond: cond.tab.o lex.o
+       gcc -o $@ $^ $(LDLIBS)
+
+cond.tab.o: cond.tab.c
+
+lex.o: lex.c cond.tab.c
+
+cond.tab.c: cond.y
+       bison -dvt cond.y
 
 clean:
-       rm -rf cond.tab.c cond  
+       rm -rf cond.tab.[ch] cond.output cond *.o