-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (38 loc) · 835 Bytes
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
LDLIBS = -lm -pthread
OBJS = rt.o \
src/utils/pvect.o \
src/utils/refcnt.o \
src/utils/evect.o \
src/utils/alloc.o \
src/runners/run_single.o \
src/runners/run_multi.o \
src/rendering.o \
src/bmp.o \
src/image.o \
src/camera.o \
src/sphere.o \
src/phong.o \
src/scene.o \
src/triangle.o \
src/obj_loader.o \
src/antialias.o \
src/normal_material.o
DEPS = $(OBJS:.o=.d)
BIN = rt
CPPFLAGS = -MMD -D_GNU_SOURCE -iquote includes/ -D_POSIX_C_SOURCE=200809
CFLAGS ?= -Wall -Wextra -pedantic --std=c99
all: $(BIN)
$(BIN): $(OBJS)
debug: CFLAGS += -O0 -g3
debug: LDLIBS +=
debug: all
debug-asan: CFLAGS += -fsanitize=address
debug-asan: LDLIBS += -fsanitize=address
debug-asan: debug
release: CFLAGS += -flto -O3
release: LDLIBS += -flto
release: all
-include $(DEPS)
clean:
$(RM) $(OBJS) $(DEPS)
.PHONY: all clean