Changeset View
Changeset View
Standalone View
Standalone View
support/xhpast/Makefile
BISONFLAGS = --verbose -d | |||||
CPPFLAGS = -fPIC -Wall | |||||
FLEXFLAGS = -C | |||||
epriestley: CPPFLAGS also always gets -Wall I think? | |||||
ifdef DEBUG | ifdef DEBUG | ||||
CPPFLAGS = -fPIC -ggdb -Wall -DDEBUG | BISONFLAGS += --debug | ||||
CPPFLAGS += -ggdb -DDEBUG | |||||
FLEXFLAGS += --debug | |||||
else | else | ||||
CPPFLAGS = -fPIC -Wall -O3 -minline-all-stringops | CPPFLAGS += -O3 -minline-all-stringops | ||||
endif | endif | ||||
ifdef PROFILE | ifdef PROFILE | ||||
CPPFLAGS += -pg | CPPFLAGS += -pg | ||||
endif | endif | ||||
ifdef STATIC | ifdef STATIC | ||||
CPPFLAGS += -static | CPPFLAGS += -static | ||||
endif | endif | ||||
ifdef MSYSTEM | ifdef MSYSTEM | ||||
CPPFLAGS += -static-libgcc -static-libstdc++ | CPPFLAGS += -static-libgcc -static-libstdc++ | ||||
endif | endif | ||||
ROOT = ../../src/parser/xhpast | ROOT = ../../src/parser/xhpast | ||||
all: xhpast | all: xhpast | ||||
clean: | clean: | ||||
-rm xhpast parser.yacc.output libxhpast.a *.o 2>/dev/null | -rm xhpast parser.yacc.output libxhpast.a *.o 2>/dev/null | ||||
cleanall: clean | cleanall: clean | ||||
-rm scanner.lex.cpp scanner.lex.hpp parser.yacc.cpp parser.yacc.hpp | -rm scanner.lex.cpp scanner.lex.hpp parser.yacc.cpp parser.yacc.hpp | ||||
install: xhpast | install: xhpast | ||||
cp xhpast $(ROOT)/bin/xhpast | cp xhpast $(ROOT)/bin/xhpast | ||||
scanner: scanner.l | scanner: scanner.l | ||||
flex -C --header-file=scanner.lex.hpp -o scanner.lex.cpp -d $< | flex $(FLEXFLAGS) --header-file=scanner.lex.hpp --outfile=scanner.lex.cpp $< | ||||
echo '/* @gen''er''ated */' >> scanner.lex.cpp | echo '/* @gen''er''ated */' >> scanner.lex.cpp | ||||
echo '/* @gen''er''ated */' >> scanner.lex.hpp | echo '/* @gen''er''ated */' >> scanner.lex.hpp | ||||
parser: parser.y | parser: parser.y | ||||
bison --debug --verbose -d -o parser.yacc.cpp $< | bison $(BISONFLAGS) --output=parser.yacc.cpp $< | ||||
echo '/* @gen''er''ated */' >> parser.yacc.cpp | echo '/* @gen''er''ated */' >> parser.yacc.cpp | ||||
echo '/* @gen''er''ated */' >> parser.yacc.hpp | echo '/* @gen''er''ated */' >> parser.yacc.hpp | ||||
node_names.hpp: generate_nodes.php | node_names.hpp: generate_nodes.php | ||||
php -f generate_nodes.php | php -f generate_nodes.php | ||||
cp parser_nodes.php $(ROOT)/ | cp parser_nodes.php $(ROOT)/ | ||||
%.o: %.cpp | %.o: %.cpp | ||||
Show All 18 Lines |
CPPFLAGS also always gets -Wall I think?