aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3e0b72e..fe3b4ce 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,27 @@
CC = cc
CFLAGS = -Wall -Wextra -g
LDFLAGS = -ltls
+LEX = lex
+YACC = yacc
.PHONY: all clean test
all: gmid TAGS README.md
-gmid: gmid.o iri.o utf8.o
- ${CC} gmid.o iri.o utf8.o -o gmid ${LDFLAGS}
+lex.yy.c: lex.l y.tab.c
+ ${LEX} lex.l
+
+y.tab.c: parse.y
+ ${YACC} -b y -d parse.y
+
+gmid: gmid.o iri.o utf8.o lex.yy.o y.tab.o
+ ${CC} gmid.o iri.o utf8.o lex.yy.o y.tab.o -o gmid ${LDFLAGS}
TAGS: gmid.c iri.c utf8.c
-etags gmid.c iri.c utf8.c || true
clean:
- rm -f *.o gmid iri_test
+ rm -f *.o lex.yy.c y.tab.c y.tab.h y.output gmid iri_test
iri_test: iri_test.o iri.o utf8.o
${CC} iri_test.o iri.o utf8.o -o iri_test ${LDFLAGS}