Assignment-3/Makefile

17 lines
345 B
Makefile

all: parse
parser.cpp parser.hpp: parser.y
bison -d -o parser.cpp parser.y
tree.o: tree.cpp
g++ -g -c -o tree.o tree.cpp
scanner.cpp: scanner.l
flex -o scanner.cpp scanner.l
parse: main.cpp parser.cpp scanner.cpp tree.o
g++ -g main.cpp parser.cpp scanner.cpp tree.o -o parse
clean:
rm -f parse scanner.cpp parser.cpp parser.hpp tree.o