Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106835120
Makefile
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Apr 1, 07:45
Size
1 KB
Mime Type
text/x-makefile
Expires
Thu, Apr 3, 07:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25285166
Attached To
rPHU libphutil
Makefile
View Options
ifdef DEBUG
CPPFLAGS = -fPIC -ggdb -Wall -DDEBUG
else
CPPFLAGS = -fPIC -g -Wall -O3 -minline-all-stringops
endif
ifdef PROFILE
CPPFLAGS += -pg
endif
ROOT = ../../src/parser/xhpast
all: xhpast
clean:
-rm xhpast parser.yacc.output libxhpast.a *.o 2>/dev/null
cleanall: clean
-rm scanner.lex.cpp scanner.lex.hpp parser.yacc.cpp parser.yacc.hpp
install: xhpast
cp xhpast $(ROOT)/bin/xhpast
scanner: scanner.l
./find_flex.sh >/dev/null && \
`./find_flex.sh` -C --header-file=scanner.lex.hpp -o scanner.lex.cpp -d $<
echo '/* @generated */' >> scanner.lex.cpp
echo '/* @generated */' >> scanner.lex.hpp
parser: parser.y
bison --debug --verbose -d -o parser.yacc.cpp $<
echo '/* @generated */' >> parser.yacc.cpp
echo '/* @generated */' >> parser.yacc.hpp
node_names.hpp: generate_nodes.php
php -f generate_nodes.php
cp parser_nodes.php $(ROOT)/constants/
%.o: %.cpp
$(CXX) -c $(CPPFLAGS) -o $@ $<
needparserscanner:
@([ -e parser.yacc.hpp ] && [ -e parser.yacc.cpp ] && \
[ -e scanner.lex.hpp ] && [ -e scanner.lex.cpp ]) \
|| (echo "Run 'make parser scanner' first.'" && exit 1)
parser.yacc.o: needparserscanner scanner.lex.hpp
scanner.lex.o: needparserscanner parser.yacc.hpp node_names.hpp
libxhpast.a: astnode.o scanner.lex.o parser.yacc.o
$(AR) -crs $@ $^
xhpast: xhpast.cpp libxhpast.a
$(CXX) $(CPPFLAGS) -o $@ $^
.PHONY: all clean
Event Timeline
Log In to Comment