bproxy/Makefile

33 lines
928 B
Makefile

CC = gcc
# CC = clang
CCFLAGS = -std=c11 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-implicit-fallthrough -pedantic -pedantic-errors -fsanitize=address -g
SERVER_SOURCES=src/server.c src/args.c
CLIENT_SOURCES=src/client.c
SERVER_LIBS=include/server.h include/args.h
CLIENT_LIBS=include/client.h
SERVER_OBJ=server
CLIENT_OBJ=client
all: $(CLIENT_OBJ) $(SERVER_OBJ)
$(SERVER_OBJ): $(SERVER_SOURCES) $(SERVER_LIBS)
$(CC) $(CCFLAGS) -o $(SERVER_OBJ) $(SERVER_SOURCES)
$(CLIENT_OBJ): $(CLIENT_SOURCES) $(CLIENT_LIBS)
$(CC) $(CCFLAGS) -o $(CLIENT_OBJ) $(CLIENT_SOURCES)
clean:
rm -f $(CLIENT_OBJ) $(SERVER_OBJ)
test:
pvs-studio-analyzer trace -- make
pvs-studio-analyzer analyze
plog-converter -a '64:1,2,3;GA:1,2,3;OP:1,2,3' -t tasklist -o report.tasks PVS-Studio.log
cppcheck --quiet --enable=all --force --inconclusive .
cleanTest:
rm -f PVS-Studio.log report.tasks strace_out
.PHONY: all clean test cleanTest