-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (45 loc) · 1.24 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
CC=clang
CXX=clang++
RM=rm -f
CPPFLAGS=-D_DEBUG -g#-O2
LDLIBS=-lglfw -framework OpenGL -framework ApplicationServices
LDFLAGS=-L/opt/homebrew/lib
INCLUDES=-Iinclude -Iengine -Iengine/common -Iengine/math -Iengine/include -I/opt/homebrew/include
SRCS_CPP= \
engine/common/platform_osx.cpp \
engine/common/mtrand.cpp \
engine/datamanager/data.cpp \
engine/datamanager/dataserializer.cpp \
engine/math/collision.cpp \
engine/math/color.cpp \
engine/math/euler.cpp \
engine/math/frustum.cpp \
engine/math/matrix.cpp \
engine/math/quaternion.cpp \
engine/math/vector.cpp \
engine/math/graph.cpp \
engine/renderer/application.cpp \
engine/renderer/image_read.cpp \
engine/renderer/renderer.cpp \
engine/renderer/renderingcontext.cpp \
engine/renderer/shaders.cpp \
engine/renderer/stanfordbunny.cpp \
game/character.cpp \
game/game.cpp \
game/handle.cpp \
game/main.cpp \
SRCS_C= \
engine/renderer/gl.c \
SRCS= $(SRCS_CPP) $(SRCS_C)
OBJS_CPP=$(subst .cpp,.o,$(SRCS_CPP))
OBJS_C=$(subst .c,.o,$(SRCS_C))
OBJS=$(OBJS_CPP) $(OBJS_C)
all: mfgd
mfgd: $(OBJS)
$(CXX) $(LDFLAGS) -o mfgd $(OBJS) $(LDLIBS)
%.o:%.c
$(CC) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
%.o:%.cpp
$(CXX) $(CPPFLAGS) -std=c++0x $(INCLUDES) -c $< -o $@
clean:
$(RM) $(OBJS) mfgd