blob: c8c4a2d9929e70604812a43a952f0636edfa0ffb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
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} images/house_1.ppm -f edge | imv images/house_1.ppm -
debug: $(BIN)
gdb $< --tui
clean:
@rm $(OBJS) $(OBJDIR) -rv
|