diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-14 14:36:53 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-14 14:36:53 -0400 |
commit | caecc4c8a174d136e66fafe6fa5d6b63285b2a1a (patch) | |
tree | b3116a698c828bc4556861fa096f01a59655e6f8 /makefile | |
parent | b7d1fec244848a42f4cd1d7c62356511de48dc2b (diff) |
Add makefile
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..71ae3fc --- /dev/null +++ b/makefile @@ -0,0 +1,34 @@ +CC = gcc +FLAGS = -g +YACC = yacc +LEX = lex + +mypc: y.tab.o lex.yy.o tree.o hash.o node.o pc.o + $(CC) $(FLAGS) -o mypc mypc.o tree.o hash.o node.o y.tab.o lex.yy.o -lfl -ly + +pc.o: mypc.c pc.h + $(CC) $(FLAGS) -c mypc.c + +tree.o: tree.c tree.h + $(CC) $(FLAGS) -c tree.c + +hash.o: hash.c hash.h + $(CC) $(FLAGS) -c hash.c + +node.o: node.c node.h + $(CC) $(FLAGS) -c node.c + +y.tab.o: y.tab.c + $(CC) $(FLAGS) -c y.tab.c + +lex.yy.o: lex.yy.c + $(CC) $(FLAGS) -c lex.yy.c + +y.tab.c: pc.y + $(YACC) -y -dv pc.y + +lex.yy.c: pc.l + $(LEX) -l pc.l + +clean: + rm -f mypc *.o y.tab.* lex.yy.* |