33 lines
777 B
Makefile
33 lines
777 B
Makefile
CC = gcc
|
|
CCFLAGS = -Wall -std=c99 -pedantic -g # (si queremos debuggear)
|
|
|
|
SOURCES = $(wildcard *.c)
|
|
OBJECTS = $(SOURCES:.c=.o)
|
|
|
|
#all: $(OBJECTS)
|
|
|
|
#%.o : %.c
|
|
# $(CC) $(CFLAGS) $^ -o $@
|
|
all: masterV2.o error.o slave.o
|
|
$(CC) $(CCFLAGS) -o master masterV2.o error.o
|
|
masterV2.o: masterV2.c error.h
|
|
$(CC) $(CCFLAGS) -c masterV2.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
|
|
|
|
clean:
|
|
rm -rf $(OBJECTS)
|
|
|
|
test:
|
|
# Agregar encabezados primero!!!!
|
|
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
|
|
|