-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
39 lines (30 loc) · 725 Bytes
/
Copy pathmakefile
File metadata and controls
39 lines (30 loc) · 725 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
CC = gcc
FLAGS = -O3 -g -march=native -D_GNU_SOURCE
FLAGS += -lpthread -flto
FLAGS += -Wall -Wextra -Wunused-parameter
SRC := $(shell find ./src -name "*.c")
OBJ_DIR = obj
OBJS := $(SRC:.c=.o)
OUTPUT := orca_test
.PHONY: all directories $(OUTPUT) echo
all: directories $(OUTPUT)
$(OUTPUT): $(OBJS)
$(CC) $(CFLAGS) $^ -o $@
# rule to compile .c to .o
%.o: %.c
# echo hi
# mkdir -p $(OBJ_DIR)/$(dir $@)
# $(CC) $(FLAGS) -c $< -o $(OBJ_DIR)/$@
$(CC) $(FLAGS) -c $< -o $@
directories:
# mkdir -p $(OBJ_DIR)
docker:
docker build -t kvcache .
docker run --rm kvcache
docker build -f Dockerfile.test -t test-test .
docker build -f Dockerfile.prod -t test-prod .
run:
./orca
clean:
rm -f $(OBJS)
# rm -r ./obj