aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-07-27 21:08:22 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-07-27 21:08:22 -0400
commit60507214c098beaf3ae01a202e564bfe2f7c8364 (patch)
treef189004a59cf1a19a743469a92f996f7615cdc02 /makefile
parentd9ba5ec2f86dd69eae4edac586a889fccd8d31b1 (diff)
Add basic scoping
Diffstat (limited to 'makefile')
-rw-r--r--makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/makefile b/makefile
index 8dd5899..c429f3c 100644
--- a/makefile
+++ b/makefile
@@ -3,19 +3,22 @@ FLAGS = -g
YACC = yacc
LEX = lex
-mypc: y.tab.o lex.yy.o tree.o scope.o node.o pc.o
- $(CC) $(FLAGS) -o mypc main.o tree.o scope.o node.o y.tab.o lex.yy.o -lfl -ly
+mypc: y.tab.o lex.yy.o tree.o scope.o node.o pc.o sem_check.o
+ $(CC) $(FLAGS) -o mypc main.o tree.o scope.o sem_check.o node.o y.tab.o lex.yy.o -lfl -ly
-pc.o: main.c pc.h
+pc.o: main.c headers
$(CC) $(FLAGS) -c main.c
-tree.o: tree.c tree.h
+tree.o: tree.c headers
$(CC) $(FLAGS) -c tree.c
-scope.o: scope.c scope.h
+sem_check.o: sem_check.c headers
+ $(CC) $(FLAGS) -c sem_check.c
+
+scope.o: scope.c headers
$(CC) $(FLAGS) -c scope.c
-node.o: node.c node.h
+node.o: node.c headers
$(CC) $(FLAGS) -c node.c
y.tab.o: y.tab.c
@@ -30,5 +33,7 @@ y.tab.c: pc.y
lex.yy.c: pc.l
$(LEX) -l pc.l
+headers: pc.h tree.h sem_check.h y.tab.h scope.h node.h y.tab.c
+
clean:
rm -f mypc *.o y.tab.* lex.yy.*