Convert to c++
This commit is contained in:
17
src/Makefile
17
src/Makefile
@@ -1,18 +1,19 @@
|
||||
.PHONY: all clean
|
||||
all: deelang
|
||||
CC = g++
|
||||
|
||||
lexer.o lexer.h: parser.h lexer.l
|
||||
flex -o lexer.c --header-file=lexer.h lexer.l
|
||||
$(CC) -c lexer.c
|
||||
rm lexer.c
|
||||
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.c --header=parser.h parser.y
|
||||
$(CC) -c parser.c
|
||||
rm parser.c
|
||||
bison -o parser.cpp --header=parser.h parser.y
|
||||
$(CC) -c parser.cpp
|
||||
rm parser.cpp
|
||||
|
||||
deelang: deelang.c lexer.o parser.o syntax.o
|
||||
deelang: deelang.cpp lexer.o parser.o syntax.o
|
||||
$(CC) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -rf parser.o lexer.o parser.h lexer.h deelang
|
||||
rm -rf *.o parser.h lexer.h deelang
|
||||
|
||||
Reference in New Issue
Block a user