aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-07-22 17:19:33 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-07-22 17:19:33 +0200
commit2a20043edb282dff05c9832b1576bf8894dd6473 (patch)
tree572638a56b46cbd90534ea6ba562b544f7273ec7 /Makefile
parent2fd810be649548de92b7b34900205555250fab3b (diff)
downloadproperties-2a20043edb282dff05c9832b1576bf8894dd6473.tar.gz
properties-2a20043edb282dff05c9832b1576bf8894dd6473.zip
Add a first draft of the parser
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 85e0bb8..de0f79f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,10 @@ LEX = lex
YACC = yacc
CC = cc
-OBJ = properties-lexer.o
+OBJ = properties-parser.o properties-lexer.o
CFLAGS = -DVERSION=${VER}
-LFLAGS = -ll
+LFLAGS = -ll -ly
all: properties
@@ -17,6 +17,12 @@ properties-lexer.o: properties.l
@mv lex.yy.c properties-lexer.c
${CC} ${CFLAGS} -c properties-lexer.c
+properties-parser.o properties-parser.h: properties.y
+ ${YACC} -d properties.y
+ @mv y.tab.c properties-parser.c
+ @mv y.tab.h properties-parser.h
+ ${CC} ${CFLAGS} -c properties-parser.c
+
properties: ${OBJ}
${CC} ${OBJ} -o $@ ${LFLAGS}
@@ -24,3 +30,4 @@ clean:
@rm -f ${OBJ} *.core a.out
@rm -f properties-lexer.c lex.*
@rm -f properties
+ @rm -f properties-parser.* y.*