-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (62 loc) · 2.43 KB
/
Makefile
File metadata and controls
73 lines (62 loc) · 2.43 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
CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -O2 -I.
BUILD_DIR = build
DBMS_OBJS = $(BUILD_DIR)/main.o \
$(BUILD_DIR)/src/util/string.o \
$(BUILD_DIR)/src/sql/parser.o \
$(BUILD_DIR)/src/storage/disk_manager.o \
$(BUILD_DIR)/src/storage/buffer_pool.o \
$(BUILD_DIR)/src/storage/slotted_page.o \
$(BUILD_DIR)/src/storage/heap_file.o \
$(BUILD_DIR)/src/sql/tuple.o \
$(BUILD_DIR)/src/sql/catalog.o \
$(BUILD_DIR)/src/sql/analyzer.o \
$(BUILD_DIR)/src/sql/plan_node.o \
$(BUILD_DIR)/src/sql/operators.o \
$(BUILD_DIR)/src/sql/planner.o \
$(BUILD_DIR)/src/sql/executor.o
BENCH_OBJS = $(BUILD_DIR)/benchmark.o \
$(filter-out $(BUILD_DIR)/main.o,$(DBMS_OBJS))
TEST_OBJS = $(BUILD_DIR)/tests/sql/test_parser.o \
$(BUILD_DIR)/tests/storage/test_disk_manager.o \
$(BUILD_DIR)/tests/storage/test_buffer_pool.o \
$(BUILD_DIR)/tests/storage/test_slotted_page.o \
$(BUILD_DIR)/tests/storage/test_heap_file.o \
$(BUILD_DIR)/tests/storage/test_integration.o \
$(BUILD_DIR)/tests/sql/test_tuple.o \
$(BUILD_DIR)/tests/sql/test_catalog.o \
$(BUILD_DIR)/tests/sql/test_analyzer.o \
$(BUILD_DIR)/tests/sql/test_executor.o \
$(BUILD_DIR)/tests/sql/test_operators.o \
$(BUILD_DIR)/src/util/string.o \
$(BUILD_DIR)/src/sql/parser.o \
$(BUILD_DIR)/src/storage/disk_manager.o \
$(BUILD_DIR)/src/storage/buffer_pool.o \
$(BUILD_DIR)/src/storage/slotted_page.o \
$(BUILD_DIR)/src/storage/heap_file.o \
$(BUILD_DIR)/src/sql/tuple.o \
$(BUILD_DIR)/src/sql/catalog.o \
$(BUILD_DIR)/src/sql/analyzer.o \
$(BUILD_DIR)/src/sql/plan_node.o \
$(BUILD_DIR)/src/sql/operators.o \
$(BUILD_DIR)/src/sql/planner.o \
$(BUILD_DIR)/src/sql/executor.o
dbms: $(DBMS_OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^
$(BUILD_DIR)/%.o: %.cpp
@mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) -c $< -o $@
benchmark: $(BENCH_OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^
run: dbms
./dbms
bench: benchmark
./benchmark
test: $(BUILD_DIR)/run_tests
$<
$(BUILD_DIR)/run_tests: $(TEST_OBJS)
@mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) -o $@ $^
clean:
rm -rf $(BUILD_DIR) dbms benchmark
.PHONY: run test bench clean