Commit 391fc109 authored by Thomas Kuntz's avatar Thomas Kuntz
Browse files

add the -i option to EaseaLex.l compilation

in CMakeLists.txt (-i means that the lexer won't be case sensitive)

Also modified the Makefile to compile EaseaLex.l and EaseaParse.y with
Flex and Yacc (and not alexyacc)
parent 8ad116dd
...@@ -25,7 +25,7 @@ SET_TARGET_PROPERTIES(program_options PROPERTIES OUTPUT_NAME "program_options" P ...@@ -25,7 +25,7 @@ SET_TARGET_PROPERTIES(program_options PROPERTIES OUTPUT_NAME "program_options" P
find_package(BISON) find_package(BISON)
find_package(FLEX) find_package(FLEX)
FLEX_TARGET(Lexer compiler/EaseaLex.l compiler/EaseaLex.cpp) FLEX_TARGET(Lexer compiler/EaseaLex.l compiler/EaseaLex.cpp COMPILE_FLAGS -i)
BISON_TARGET(Parser compiler/EaseaParse.y compiler/EaseaParse.cpp COMPILE_FLAGS -d) BISON_TARGET(Parser compiler/EaseaParse.y compiler/EaseaParse.cpp COMPILE_FLAGS -d)
#Easea compiler #Easea compiler
......
...@@ -2,11 +2,13 @@ UNAME := $(shell uname) ...@@ -2,11 +2,13 @@ UNAME := $(shell uname)
ifeq ($(shell uname -o 2>/dev/null),Msys) ifeq ($(shell uname -o 2>/dev/null),Msys)
OS := MINGW OS := MINGW
endif endif
YACC=bison
LEX=flex
EXEC = bin/easea EXEC = bin/easea
CPPFLAGS += -DUNIX_OS -Ialexyacc/include/ -g -Wno-deprecated -DDEBUG -DLINE_NUM_EZ_FILE CPPFLAGS += -DUNIX_OS -g -Wno-deprecated -DDEBUG -DLINE_NUM_EZ_FILE
LDFLAGS = LDFLAGS =
OBJ= build/EaseaSym.o build/EaseaParse.o build/EaseaLex.o alexyacc/libalex.a build/EaseaYTools.o boost/program_options.a libeasea/libeasea.a OBJ= build/EaseaSym.o build/EaseaParse.o build/EaseaLex.o build/EaseaYTools.o boost/program_options.a libeasea/libeasea.a
#ifeq ($(UNAME),Darwin) #ifeq ($(UNAME),Darwin)
$(EXEC):build bin $(OBJ) $(EXEC):build bin $(OBJ)
...@@ -82,19 +84,18 @@ bin: ...@@ -82,19 +84,18 @@ bin:
build/EaseaParse.o: compiler/EaseaParse.cpp compiler/EaseaLex.cpp build/EaseaParse.o: compiler/EaseaParse.cpp compiler/EaseaLex.cpp
$(CXX) $(CPPFLAGS) $< -o $@ -c -w $(CXX) $(CPPFLAGS) $< -o $@ -c -w
build/EaseaLex.o: compiler/EaseaLex.cpp build/EaseaLex.o: compiler/EaseaLex.cpp compiler/EaseaParse.hpp
$(CXX) $(CPPFLAGS) $< -o $@ -c -w $(CXX) $(CPPFLAGS) $< -o $@ -c -w
build/%.o:compiler/%.cpp build/%.o:compiler/%.cpp
$(CXX) $(CPPFLAGS) -c -o $@ $< $(CXX) $(CPPFLAGS) -c -o $@ $<
#compile library for alex and ayacc unix version compiler/EaseaParse.cpp:compiler/EaseaParse.y
alexyacc/libalex.so:alexyacc/*.cpp $(YACC) -d -o $@ $<
cd alexyacc && make libalex.so
alexyacc/libalex.a:alexyacc/*.cpp compiler/EaseaLex.cpp:compiler/EaseaLex.l
cd alexyacc && make libalex.a $(LEX) -i -o $@ $<
#ifeq ($(UNAME),Darwin) #ifeq ($(UNAME),Darwin)
boost/program_options.a:boost/*.cpp boost/program_options.a:boost/*.cpp
...@@ -107,7 +108,6 @@ libeasea/libeasea.a:libeasea/*.cpp ...@@ -107,7 +108,6 @@ libeasea/libeasea.a:libeasea/*.cpp
clean: clean:
rm -f build/*.o $(EXEC) $(EXEC)_bin rm -f build/*.o $(EXEC) $(EXEC)_bin
cd alexyacc && make clean
cd libeasea && make clean cd libeasea && make clean
cd boost && make clean cd boost && make clean
#ifeq ($(UNAME),Darwin) #ifeq ($(UNAME),Darwin)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment