-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (22 loc) · 773 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (22 loc) · 773 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
.PHONY: cstorage cstorage-client lint test test-docker
SRCS = arguments.c connection.c epoll.c handler_get.c handlers.c handler_set.c main.c socket.c
OBJS = ${SRCS:.c=.o}
CC = clang-12
FLAGS = -std=c2x -fsanitize=address,undefined -fno-sanitize-recover=all -O0 -g -Wall -Wextra -pedantic
CLIENT_FLAGS = -std=gnu2x -fsanitize=address,undefined -fno-sanitize-recover=all -O0 -g -Wall -Wextra -pedantic
all: cstorage cstorage-client
cstorage: ${OBJS}
${CC} ${FLAGS} ${OBJS} -o $@
cstorage-client:
${CC} ${CLIENT_FLAGS} client.c -o $@
.c.o:
${CC} ${FLAGS} -c $< -o $@
clean:
rm *.o
lint:
clang-tidy ./*.c
test: cstorage cstorage-client
cd test && ./test.sh
test-docker:
docker build --tag test-image --file ./test/docker/Dockerfile .
docker run test-image