forked from WesleyBlq/sql_parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (56 loc) · 1.74 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#################################################################################
#################################################################################
#################################################################################
#################################################################################
all: libsql.a parser_test
SYSLIBS_test = -Wl,-rpath -Wl,LIBDIR -lglog
CPPFLAGS = \
#-I/usr/local/mysql-cpp-connector/mysql-connector-c++-1.1.3-linux-glibc2.3-x86-64bit/include \
#-I/usr/local/include
USERLIBS_test = $(SYSLIBS_test) \
#-L/usr/local/mysql/lib \
#-L/usr/local/mysql-cpp-connector/mysql-connector-c++-1.1.3-linux-glibc2.3-x86-64bit/lib
LDLIBS = $(USERLIBS_test) \
../sql/libsql.a ../route/libroute.a -lcrypto ../log/liblog.a \
/usr/local/lib/libzookeeper_mt.a \
/usr/local/lib/libjson_linux-gcc-4.1.2_libmt.a \
-lmysqlclient
##libsql.a
OBJS_SQL = \
parse_malloc.o \
parse_node.o \
sql_non_reserved_keywords.o \
sql_parser.lex.o \
sql_parser.tab.o \
utility.o \
ob_number.o \
ob_object.o \
ob_obj_type.o \
ob_raw_expr.o \
ob_obj_cast.o \
ob_expr_obj.o \
ob_stmt.o \
ob_delete_stmt.o \
ob_insert_stmt.o \
ob_update_stmt.o \
ob_select_stmt.o \
ob_show_stmt.o \
ob_variable_set_stmt.o \
ob_logical_plan.o\
dml_build_plan.o \
crud_build_plan.o \
query_reduce.o \
jd_exec_plan.o
#libsql.a
%o: %c
gcc -Wall -g -c -o $@ $<
%o: %cpp
g++ -Wall -g -c -o $@ $<
libsql.a: $(OBJS_SQL)
ar rv libsql.a ${OBJS_SQL}
g++ -Wl,-rpath -Wl,LIBDIR $(CCFLAGS_test) $(CPPFLAGS) -o parser_test parser_test.cpp $(LDLIBS)
parser_test: parser_test.cpp
g++ -Wl,-rpath -Wl,LIBDIR $(CCFLAGS_test) $(CPPFLAGS) -o $@ parser_test.cpp $(LDLIBS)
.PHONY:clean
clean:
rm -f *.o parser_test libsql.a