bssolver/Makefile

39 lines
1.2 KiB
Makefile

CC = gcc
CCFLAGS = -Wall -std=c99 -pedantic -g
OBJECTS = master.o error.o slave.o shr_mem.o view.o siglib.o solve view
all: $(OBJECTS)
master.o: master.c error.h
$(CC) $(CCFLAGS) -c master.c
error.o: error.c error.h
$(CC) $(CCFLAGS) -c error.c
slave.o: slave.c error.o
$(CC) $(CCFLAGS) slave.c -o slave.o error.o
shr_mem.o: shr_mem.c error.h
$(CC) $(CCFLAGS) -c shr_mem.c
view.o: view.c
$(CC) $(CCFLAGS) -c view.c
siglib.o: siglib.c
$(CC) $(CCFLAGS) -c siglib.c
solve: master.o error.o shr_mem.o siglib.o
$(CC) $(CCFLAGS) -o solve master.o error.o shr_mem.o siglib.o -lm -lrt -lpthread
view: view.o error.o shr_mem.o siglib.o
$(CC) $(CCFLAGS) -o view view.o error.o shr_mem.o siglib.o -lrt -lpthread
clean:
rm -rf $(OBJECTS)
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 .
valgrind --leak-check=full --track-origins=yes ./solve HardTest/*.cnf > valgrindSolve.output 2>&1
./solve HardTest/*.cnf | valgrind --leak-check=full --show-leak-kinds=all ./view > valgrindView.output 2>&1
valgrind --leak-check=full ./slave > valgrindSlave.output 2>&1 < Test/*.cnf
.PHONY: all clean test