bproxy/Makefile

31 lines
1.1 KiB
Makefile

CCFLAGS = -std=c11 -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -pedantic -pedantic-errors -fsanitize=address -g -D_POSIX_C_SOURCE=200809L
LDFLAGS = -lpthread
SERVER_SOURCES=src/args.c src/selector.c src/socks5nio.c src/stm.c src/hello.c src/request.c src/buffer.c src/server.c
SERVER_LIBS=include/args.h include/selector.h include/socks5nio.h include/stm.h include/hello.h include/request.h include/buffer.h include/server.h
SERVER_OBJECTS=$(SERVER_SOURCES:.c=.o)
SERVER_TARGET=socks5d
all: $(SERVER_OBJECTS) $(SERVER_TARGET)
%.o : %.c
$(CC) $(CCFLAGS) $(LDFLAGS) -I ./include -c $< -o $@
$(SERVER_TARGET): $(SERVER_OBJECTS)
$(CC) $(CCFLAGS) $(LDFLAGS) -I ./include -o $@ $^
clean:
rm -f $(SERVER_OBJECTS) $(SERVER_TARGET)
test: clean
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
rm -f PVS-Studio.log
cppcheck --quiet --enable=all --force --inconclusive -I include .
cleanTest:
rm -f report.tasks strace_out
.PHONY: all clean test cleanTest