1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
CFILES := $(wildcard *.c) CFILES += $(wildcard test/*.c) OFILES := $(patsubst %.c,%.o,$(CFILES)) OUT := malloc-test CFLAGS := -Wall -Wextra -Wpedantic all: $(OUT) ./$(OUT) clean: rm $(OFILES) $(OUT): ${OFILES} $(JDTLIB) $(CC) $(OFILES) -o $(OUT) %.o: %.c $(CC) $(CFLAGS) -c $< -o $@