-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·70 lines (58 loc) · 3.7 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
CC = g++
CFLAGS = -pg -g -lglog -lgtest
CXXTESTFLAGS = -lgtest -pthread -lglog
LDFLAGS = -L/usr/X11R6/lib -lglut -lGLU -lGL -lXmu -lX11 -lm -pg -g -lglog -lGLEW
LDFLAGSAPPLE = -lm -pg -g -lglog -framework OpenGL -framework GLUT /opt/local/lib/libGLEW.a
APPLICATION := $(patsubst %.cpp,%.o,$(wildcard Src/Application/*.cpp))
BASE := $(patsubst %.cpp,%.o,$(wildcard Src/Base/*.cpp))
GEOMETRY := $(patsubst %.cpp,%.o,$(wildcard Src/Base/Geometry/*.cpp))
GRAPH := $(patsubst %.cpp,%.o,$(wildcard Src/Graph/*.cpp))
GRAPHICSADAPTER := $(patsubst %.cpp,%.o,$(wildcard Src/Graphics/Adapter/*.cpp))
GRAPHICSOPENGL := $(patsubst %.cpp,%.o,$(wildcard Src/Graphics/OpenGLFixed/*.cpp))
INCLUDE := $(patsubst %.cpp,%.o,$(wildcard Src/Include/*.cpp))
GL := $(patsubst %.cpp,%.o,$(wildcard Src/Include/GL/*.c))
MESHLOADERS := $(patsubst %.cpp,%.o,$(wildcard Src/MeshLoaders/*.cpp))
#SHOWCASE := $(patsubst %.cpp,%.o,$(wildcard Src/Showcase/*.cpp))
#SRC := $(patsubst %.cpp,%.o,$(wildcard Src/*.cpp))
# Make obj for a cpp file
%.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $<
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
all: AddRemoveChild PongGame SkeletonApp ObjectsLoader SimpleGeometry TestGraphApp
clean:
rm -rf *.o \
rm -rf Src/Application/*.o \
rm -rf Src/Base/*.o \
rm -rf Src/Graph/*.o \
rm -rf Src/Graphics/Adapter/*.o \
rm -rf Src/Graphics/OpenGLFixed/*.o \
rm -rf Src/Include/*.o \
rm -rf Src/MeshLoaders/*.o \
rm -rf Src/Showcase/*.o \
rm -rf DoxygenWarnings.log
rm -rf doc/
rm -rf Tests/TestMeshLoaders
rm -rf Tests/TestCompositeNode
rm -rf Tests/TestNode
rm -rf gmon.out
rm -rf SkeletonApp
rm -rf AddRemoveChild
rm -rf ObjectsLoader
rm -rf SimpleGeometry
rm -rf PongGame
rm -rf TestGraphApp
doc:
doxygen Doxyfile
AddRemoveChild: $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
$(CC) $(LDFLAGS) -o AddRemoveChild Src/Showcase/AddRemoveChild.cpp $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
PongGame: $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
$(CC) $(LDFLAGS) -o PongGame Src/Showcase/PongGame.cpp $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
SkeletonApp: $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
$(CC) $(LDFLAGS) -o SkeletonApp Src/SkeletonApp.cpp $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
ObjectsLoader: $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
$(CC) $(LDFLAGS) -o ObjectsLoader Src/Showcase/ObjectsLoader.cpp $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
SimpleGeometry: $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
$(CC) $(LDFLAGS) -o SimpleGeometry Src/Showcase/SimpleGeometry.cpp $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
TestGraphApp: $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)
$(CC) $(LDFLAGS) -o TestGraphApp Src/TestGraphApp.cpp $(APPLICATION) $(BASE) $(GEOMETRY) $(GRAPH) $(GRAPHICSADAPTER) $(GRAPHICSOPENGL) $(INCLUDE) $(GL) $(MESHLOADERS) $(SHOWCASE) $(SRC)