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: master.o error.o slave.o $(CC) $(CFLAGS) -o master master.o error.o master.o: master.c error.h $(CC) $(CFLAGS) -c master.c error.o: error.c error.h $(CC) $(CFLAGS) -c error.c slave.o: slave.c error.o $(CC) $(CFLAGS) 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