2008-08-08 12:35:13 +00:00
|
|
|
# Copyright (c) 2008 Andrew Garrett.
|
|
|
|
# Copyright (c) 2008 River Tarnell <river@wikimedia.org>
|
|
|
|
# Derived from public domain code contributed by Victor Vasiliev.
|
|
|
|
#
|
|
|
|
# Permission is granted to anyone to use this software for any purpose,
|
|
|
|
# including commercial applications, and to alter it and redistribute it
|
|
|
|
# freely. This software is provided 'as-is', without any express or
|
|
|
|
# implied warranty.
|
|
|
|
|
2008-08-07 14:28:45 +00:00
|
|
|
include makefile.config
|
|
|
|
|
2008-08-13 17:40:09 +00:00
|
|
|
CPPFLAGS = -Iinclude $(EXTRA_CPPFLAGS)
|
2008-08-07 14:28:45 +00:00
|
|
|
LDFLAGS = $(EXTRA_LDFLAGS)
|
2008-07-29 11:03:26 +00:00
|
|
|
|
2008-08-11 22:09:34 +00:00
|
|
|
LIBS = -lboost_regex$(BOOST_TAG) -lboost_date_time$(BOOST_TAG) -lgmp -lgmpxx -licuuc -licui18n -licudata
|
2008-07-29 11:03:26 +00:00
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
af_expr_objs = \
|
2008-08-08 00:01:22 +00:00
|
|
|
af_expr-eval.o \
|
2008-08-12 14:02:33 +00:00
|
|
|
af_expr-parser.o \
|
|
|
|
af_expr-ast.o \
|
|
|
|
af_expr-filter_evaluator.o \
|
2008-08-08 03:23:34 +00:00
|
|
|
af_expr-equiv.o \
|
2008-08-08 00:01:22 +00:00
|
|
|
af_expr-request.o
|
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
af_parser_objs = \
|
2008-08-08 00:01:22 +00:00
|
|
|
af_parser-main.o \
|
|
|
|
af_parser-request.o \
|
2008-08-12 14:02:33 +00:00
|
|
|
af_parser-parser.o \
|
|
|
|
af_parser-ast.o \
|
|
|
|
af_parser-filter_evaluator.o \
|
2008-08-09 15:07:07 +00:00
|
|
|
af_parser-equiv.o
|
2008-08-08 00:01:22 +00:00
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
check_objs = \
|
|
|
|
check-check.o \
|
|
|
|
check-parser.o \
|
|
|
|
check-ast.o \
|
|
|
|
check-filter_evaluator.o \
|
2008-08-09 15:07:07 +00:00
|
|
|
check-equiv.o
|
2008-08-08 00:01:22 +00:00
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
syntax_check_objs = \
|
2008-08-08 03:23:34 +00:00
|
|
|
syntax_check-equiv.o \
|
2008-08-12 14:02:33 +00:00
|
|
|
syntax_check-parser.o \
|
|
|
|
syntax_check-ast.o \
|
|
|
|
syntax_check-filter_evaluator.o \
|
2008-08-08 00:01:22 +00:00
|
|
|
syntax_check-syntax_check.o
|
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
expr_objs = \
|
|
|
|
expr-equiv.o \
|
|
|
|
expr-parser.o \
|
|
|
|
expr-ast.o \
|
2008-08-09 14:34:17 +00:00
|
|
|
expr-expr.o
|
2008-08-07 13:57:40 +00:00
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
xml_objs = \
|
|
|
|
xml-parser.o \
|
|
|
|
xml-ast.o \
|
2008-08-10 03:52:17 +00:00
|
|
|
xml-xml.o
|
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
evaluate_objs = \
|
2008-08-09 16:44:54 +00:00
|
|
|
evaluate-equiv.o \
|
2008-08-12 14:02:33 +00:00
|
|
|
evaluate-parser.o \
|
|
|
|
evaluate-ast.o \
|
|
|
|
evaluate-filter_evaluator.o \
|
2008-08-09 16:44:54 +00:00
|
|
|
evaluate-evaluate.o
|
|
|
|
|
2008-08-12 14:02:33 +00:00
|
|
|
maketest_objs = \
|
2008-08-10 20:38:52 +00:00
|
|
|
maketest-maketest.o
|
|
|
|
|
|
|
|
progs = check af_parser syntax_check af_expr expr evaluate xml maketest
|
2008-08-07 13:57:40 +00:00
|
|
|
|
|
|
|
all: $(progs)
|
|
|
|
|
|
|
|
af_expr: $(af_expr_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(af_expr_objs) $(LDFLAGS) $(LIBS)
|
|
|
|
af_parser: $(af_parser_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(af_parser_objs) $(LDFLAGS) $(LIBS)
|
|
|
|
check: $(check_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(check_objs) $(LDFLAGS) $(LIBS)
|
|
|
|
syntax_check: $(syntax_check_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(syntax_check_objs) $(LDFLAGS) $(LIBS)
|
2008-08-08 00:01:22 +00:00
|
|
|
expr: $(expr_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(expr_objs) $(LDFLAGS) $(LIBS)
|
2008-08-09 16:44:54 +00:00
|
|
|
evaluate: $(evaluate_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(evaluate_objs) $(LDFLAGS) $(LIBS)
|
2008-08-10 03:52:17 +00:00
|
|
|
xml: $(xml_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(xml_objs) $(LDFLAGS) $(LIBS)
|
2008-08-10 20:38:52 +00:00
|
|
|
maketest: $(maketest_objs)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(maketest_objs) $(LDFLAGS)
|
2008-08-08 00:01:22 +00:00
|
|
|
|
|
|
|
$(af_expr_objs): af_expr-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:af_expr-%.o=%.cpp)
|
|
|
|
|
|
|
|
$(af_parser_objs): af_parser-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:af_parser-%.o=%.cpp)
|
|
|
|
|
|
|
|
$(check_objs): check-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:check-%.o=%.cpp)
|
|
|
|
|
|
|
|
$(syntax_check_objs): syntax_check-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:syntax_check-%.o=%.cpp)
|
|
|
|
|
|
|
|
$(expr_objs): expr-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:expr-%.o=%.cpp)
|
2008-07-29 11:03:26 +00:00
|
|
|
|
2008-08-09 16:44:54 +00:00
|
|
|
$(evaluate_objs): evaluate-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:evaluate-%.o=%.cpp)
|
|
|
|
|
2008-08-10 03:52:17 +00:00
|
|
|
$(xml_objs): xml-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:xml-%.o=%.cpp)
|
|
|
|
|
2008-08-10 20:38:52 +00:00
|
|
|
$(maketest_objs): maketest-%.o: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $(@:maketest-%.o=%.cpp)
|
|
|
|
|
|
|
|
test: maketest af_parser
|
|
|
|
cd tests && ../runtests.sh
|
|
|
|
|
2008-07-29 11:03:26 +00:00
|
|
|
clean:
|
2008-08-07 13:57:40 +00:00
|
|
|
rm -f *.o $(progs)
|
2008-08-02 11:10:42 +00:00
|
|
|
|
|
|
|
clean-final:
|
2008-08-07 13:57:40 +00:00
|
|
|
rm -f $(progs)
|
2008-08-07 12:35:42 +00:00
|
|
|
|
|
|
|
.SUFFIXES: .cpp .o
|