CC = clang CFLAGS = -std=c11 -Wall -g BIN = dsco OBJDIR = objs SRC = $(wildcard src/*.c) HEADERS = $(wildcard src/*.h) OBJS = $(SRC:src/%.c=${OBJDIR}/%.o) .PHONY: clean all run all: build $(OBJS): | $(OBJDIR) $(OBJDIR): mkdir ${OBJDIR} $(OBJDIR)/%.o: src/%.c $(HEADERS) ${CC} -c -o $@ $< ${CFLAGS} build: $(OBJS) ${CC} ${DLIBS} -o ${BIN} ${OBJS} run: build ./${BIN} test: build ./${BIN} imv images/house_1.ppm out1.ppm out2.ppm debug: $(BIN) lldb $< --tui clean: @rm $(OBJS) $(OBJDIR) -rv