-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (61 loc) · 1.92 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
# COMPILER CONFIG
COMPILER := gcc
COMPILER_FLAGS := '-g -Wall'
LINKER_FLAGS := -pthread -L${shell pwd}/include/cargparse2 -lcargparse2 -L${shell pwd}/include/clogger -lclogger
COMPILE_PATH := '-I${shell pwd}/include -I${shell pwd}/include/cargparse -I${shell pwd}/include/clogger'
# OBJECT DEFINITIONS
ALL_OBJS := entrypoint/*.o fs/*.o db/*.o parser/*.o handler/*.o comparator/*.o
# TARGETS
all: pushdb_bin
pushdb_bin: entrypoint_objs db_objs fs_objs parser_objs handler_objs comparator_objs clogger cargparse2 tpch_bin
${COMPILER} ${LINKER_FLAGS} ${ALL_OBJS} -o bin/pushdb.out
make clean_objs
db_objs:
COMPILE_PATH=${COMPILE_PATH} \
COMPILER=${COMPILER} \
COMPILER_FLAGS=${COMPILER_FLAGS} make -C db/
fs_objs:
COMPILE_PATH=${COMPILE_PATH} \
COMPILER=${COMPILER} \
COMPILER_FLAGS=${COMPILER_FLAGS} make -C fs/
parser_objs:
COMPILE_PATH=${COMPILE_PATH} \
COMPILER=${COMPILER} \
COMPILER_FLAGS=${COMPILER_FLAGS} make -C parser/
comparator_objs:
COMPILE_PATH=${COMPILE_PATH} \
COMPILER=${COMPILER} \
COMPILER_FLAGS=${COMPILER_FLAGS} make -C comparator/
entrypoint_objs:
COMPILE_PATH=${COMPILE_PATH} \
COMPILER=${COMPILER} \
COMPILER_FLAGS=${COMPILER_FLAGS} make -C entrypoint/
handler_objs:
COMPILE_PATH=${COMPILE_PATH} \
COMPILER=${COMPILER} \
COMPILER_FLAGS=${COMPILER_FLAGS} make -C handler/
.PHONY: tpch_bin
tpch_bin:
make -C tpch-dbgen/
.PHONY: clogger
clogger:
make -C include/clogger/
.PHONY: cargparse2
cargparse2:
make -C include/cargparse2/
clean_objs:
make -C db/ clean
make -C fs/ clean
make -C parser/ clean
make -C comparator/ clean
make -C entrypoint/ clean
make -C handler/ clean
clean: clean_objs
rm -f bin/*.out
make -C tpch-dbgen/ clean
make -C include/cargparse2 clean
make -C include/clogger clean
find tmp ! -type d ! \( -name "*.sql" -or -name ".gitkeep" \) -exec rm -f {} \;
distclean: clean
rm -f tmp/*
rm -f tpch-dbgen/*.tbl