-
Notifications
You must be signed in to change notification settings - Fork 106
/
Makefile.osx
66 lines (52 loc) · 1.22 KB
/
Makefile.osx
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
CC=gcc
CXX=g++
RM=rm -f
CPPFLAGS=-D_DEBUG -g #-O2
LDFLAGS=-Llib/osx
LDLIBS=-lglfw -framework OpenGL -framework ApplicationServices
INCLUDES=-I. -Icommon -Imath -Iinclude
SRCS_CPP= \
common/platform_osx.cpp \
common/mtrand.cpp \
datamanager/data.cpp \
datamanager/dataserializer.cpp \
game/character.cpp \
game/game.cpp \
game/handle.cpp \
game/main.cpp \
math/collision.cpp \
math/color.cpp \
math/euler.cpp \
math/frustum.cpp \
math/matrix.cpp \
math/quaternion.cpp \
math/vector.cpp \
math/graph.cpp \
renderer/application.cpp \
renderer/image_read.cpp \
renderer/renderer.cpp \
renderer/renderingcontext.cpp \
renderer/shaders.cpp \
renderer/stanfordbunny.cpp \
SRCS_C= \
renderer/gl3w.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)
g++ $(LDFLAGS) -o mfgd $(OBJS) $(LDLIBS)
%.o:%.c
$(CXX) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
%.o:%.cpp
$(CXX) $(CPPFLAGS) -std=c++0x $(INCLUDES) -c $< -o $@
depend: .depend
.depend: $(SRCS)
rm -f ./.depend
$(CXX) $(CPPFLAGS) $(INCLUDES) -MM $(SRCS) $^>>./.depend;
clean:
$(RM) $(OBJS) .depend
dist-clean: clean
$(RM) *~ .dependtool
include .depend