-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
35 lines (28 loc) · 1.07 KB
/
makefile
File metadata and controls
35 lines (28 loc) · 1.07 KB
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
# Define the link target.
linkTarget = qbRay
# Define the libraries that we need.
LIBS = -lSDL2
# Define any flags.
CFLAGS = -std=c++17 -Ofast -pthread
# Define the object files that we need to use.
objects = main.o \
CApp.o \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/*.cpp)) \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/qbPrimatives/*.cpp)) \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/qbLights/*.cpp)) \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/qbMaterials/*.cpp)) \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/qbTextures/*.cpp)) \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/qbRayMarch/*.cpp)) \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/qbNoise/*.cpp)) \
$(patsubst %.cpp,%.o,$(wildcard ./qbRayTrace/qbNormals/*.cpp))
# Define the rebuildables.
rebuildables = $(objects) $(linkTarget)
# Rule to actually perform the build.
$(linkTarget): $(objects)
g++ -g -o $(linkTarget) $(objects) $(LIBS) $(CFLAGS)
# Rule to create the .o (object) files.
%.o: %.cpp
g++ -o $@ -c $< $(CFLAGS)
.PHONEY:
clean:
rm $(rebuildables)