38 lines
935 B
Makefile
38 lines
935 B
Makefile
CC = gcc
|
|
CCFLAGS = -Wall -std=c99 -pedantic -g
|
|
|
|
SOURCES = $(wildcard *.c)
|
|
OBJECTS = $(SOURCES:.c=.o)
|
|
|
|
#all: $(OBJECTS)
|
|
|
|
#%.o : %.c
|
|
# $(CC) $(CFLAGS) $^ -o $@
|
|
all: master.o error.o slave.o shr_mem.o view.o
|
|
$(CC) $(CCFLAGS) -o solve master.o error.o shr_mem.o -lrt -lpthread
|
|
$(CC) $(CCFLAGS) -o view view.o error.o shr_mem.o -lrt -lpthread
|
|
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
|
|
|
|
clean:
|
|
rm -rf $(OBJECTS)
|
|
rm -rf solve view
|
|
|
|
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 (file)
|
|
|
|
.PHONY: all clean test
|
|
|