forked from hadryansalles/ray-tracing-from-the-ground-up
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
31 lines (25 loc) · 753 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
APP = RTX.out
CC = g++
FLAGS = -ansi -pedantic
LINKS = -lSDL2 -lpthread -pthread -std=c++11
RM = rm -rf
SOURCE = $(wildcard ./source/BRDF/*.cpp) \
$(wildcard ./source/Cameras/*.cpp) \
$(wildcard ./source/GeometricObjects/*.cpp) \
$(wildcard ./source/Light/*.cpp) \
$(wildcard ./source/Main/*.cpp) \
$(wildcard ./source/Materials/*.cpp) \
$(wildcard ./source/Samplers/*.cpp) \
$(wildcard ./source/Tracers/*.cpp) \
$(wildcard ./source/Utilities/*.cpp) \
$(wildcard ./source/Window/*.cpp) \
$(wildcard ./source/World/*.cpp) \
OBJECTS = $(SOURCE: .cpp = .o)
all: ./build/$(APP)
./build/$(APP): $(OBJECTS)
@ echo 'Building binary $@'
$(CC) $^ $(FLAGS) $(LINKS) -o $@
clean:
@ $(RM) ./build/$(APP)
run:
./build/$(APP)