forked from yiwenshao/Practical-Cryptdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
100 lines (73 loc) · 2.22 KB
/
Copy pathMakefile
File metadata and controls
100 lines (73 loc) · 2.22 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
MYSRC := $(shell pwd)/mysql-src
MYBUILD := $(MYSRC)/build
RPATH := 1
CXX := g++-4.7
MYSQL_PLUGIN_DIR := /usr/lib/mysql/plugin
OBJDIR := obj
TOP := $(shell echo $${PWD-`pwd`})
#CXX := g++
AR := ar
## -g -O0 -> -O2
CXXFLAGS := -g -O0 -fno-strict-aliasing -fno-rtti -fwrapv -fPIC \
-Wall -Werror -Wpointer-arith -Wendif-labels -Wformat=2 \
-Wextra -Wmissing-noreturn -Wwrite-strings -Wno-unused-parameter \
-Wno-deprecated \
-Wmissing-declarations -Woverloaded-virtual \
-Wunreachable-code -D_GNU_SOURCE -std=c++0x -I$(TOP)
LDFLAGS := -L$(TOP)/$(OBJDIR) -Wl,--no-undefined
## Use RPATH only for debug builds; set RPATH=1 in config.mk.
ifeq ($(RPATH),1)
LDRPATH := -Wl,-rpath=$(TOP)/$(OBJDIR) -Wl,-rpath=$(TOP)
endif
CXXFLAGS += -I$(MYBUILD)/include \
-I$(MYSRC)/include \
-I$(MYSRC)/sql \
-I$(MYSRC)/regex \
-I$(MYBUILD)/sql \
-DHAVE_CONFIG_H -DMYSQL_SERVER -DEMBEDDED_LIBRARY -DDBUG_OFF \
-DMYSQL_BUILD_DIR=\"$(MYBUILD)\"
LDFLAGS += -lpthread -lrt -ldl -lcrypt -lreadline
## To be populated by Makefrag files
OBJDIRS :=
.PHONY: all
all:
.PHONY: install
install:
.PHONY: clean
clean:
rm -rf $(OBJDIR) mtl
.PHONY: doc
doc:
doxygen CryptDBdoxgen
.PHONY: whitespace
whitespace:
find . -name '*.cc' -o -name '*.hh' -type f -exec sed -i 's/ *$//' '{}' ';'
.PHONY: always
always:
# Eliminate default suffix rules
.SUFFIXES:
# Delete target files if there is an error (or make is interrupted)
.DELETE_ON_ERROR:
# make it so that no intermediate .o files are ever deleted
.PRECIOUS: %.o
$(OBJDIR)/%.o: %.cc
@mkdir -p $(@D)
$(CXX) -MD $(CXXFLAGS) -c $< -o $@
$(OBJDIR)/%.o: $(OBJDIR)/%.cc
@mkdir -p $(@D)
$(CXX) -MD $(CXXFLAGS) -c $< -o $@
mtl/%:$(OBJDIR)/debug/%.o
@mkdir -p $(@D)
$(CXX) -g -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -L/$(MYBUILD)/libmysqld -lmysqld -laio -lz -ldl -lm -lcrypt -lpthread -lcryptdb -ledbcrypto -ledbutil -ledbparser -lntl -lcrypto
include crypto/Makefrag
include parser/Makefrag
include main/Makefrag
include util/Makefrag
include udf/Makefrag
include mysqlproxy/Makefrag
include debug/Makefrag
$(OBJDIR)/.deps: $(foreach dir, $(OBJDIRS), $(wildcard $(OBJDIR)/$(dir)/*.d))
@mkdir -p $(@D)
perl mergedep.pl $@ $^
echo "after merge"
-include $(OBJDIR)/.deps