20 lines
380 B
Makefile
20 lines
380 B
Makefile
.PHONY: all clean
|
|
all: deelang
|
|
CC = g++
|
|
|
|
lexer.o lexer.h: parser.h lexer.l
|
|
flex -o lexer.cpp --header-file=lexer.h lexer.l
|
|
$(CC) -c lexer.cpp
|
|
rm lexer.cpp
|
|
|
|
parser.h parser.o: parser.y
|
|
bison -o parser.cpp --header=parser.h parser.y
|
|
$(CC) -c parser.cpp
|
|
rm parser.cpp
|
|
|
|
deelang: deelang.cpp lexer.o parser.o syntax.o
|
|
$(CC) -o $@ $^
|
|
|
|
clean:
|
|
rm -rf *.o parser.h lexer.h deelang
|