-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (29 loc) · 1019 Bytes
/
Makefile
File metadata and controls
45 lines (29 loc) · 1019 Bytes
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
TEST_DB = tests/stub-data.csv
# Adds include dir to the preprocessor search path (for #include'd files)
CFLAGS = -I include
# all: run
# --- Building object files
build/commands.o: commands/load-csv.c
clang $(CFLAGS) commands/load-csv.c -c -o build/commands.o
build/executor.o: executor/seq-scan.c
clang $(CFLAGS) executor/seq-scan.c -c -o build/executor.o
build/utils.o: utils/utils.c
clang $(CFLAGS) utils/utils.c -c -o build/utils.o
OBJS = build/commands.o build/executor.o build/utils.o
compile:
clang $(CFLAGS) $(OBJS) main/main.c -o build/main.o
run: main/main.c $(OBJS)
clang $(CFLAGS) $(OBJS) main/main.c -o build/main.o
build/main.o $(TEST_DB)
# --- Entry points
test:
clang $(CFLAGS) $(OBJS) tests/test.c -o build/test.o
build/test.o
debug:
clang $(CFLAGS) $(OBJS) -g -O0 main/main.c -o build/main-debug.o
lldb -- build/main-debug.o $(TEST_DB)
debug_test:
clang $(CFLAGS) $(OBJS) -g -O0 tests/test.c -o build/test-debug.o
lldb -- build/test-debug.o $(TEST_DB)
clean:
rm build/*.o