-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·51 lines (39 loc) · 1.26 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
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
INCFLAGS = -I vecmath/include/
FRAMEWORKS = -framework Glut
FRAMEWORKS += -framework OpenGL
FRAMEWORKS += -framework Cocoa
FRAMEWORKS += -framework AGL
FRAMEWORKS += -framework Carbon
LINKFLAGS += -L vecmath/lib/ -lvecmath
LINKFLAGS += -lfltk -lfltk_gl
else
INCFLAGS = -I /usr/include/GL
INCFLAGS += -I /mit/6.837/public/include/vecmath
LINKFLAGS = -lglut $(shell fltk-config --use-gl --ldflags)
LINKFLAGS += -L /mit/6.837/public/lib -lvecmath
endif
CFLAGS = -g
CFLAGS += -DSOLN
CC = g++
SRCS = bitmap.cpp camera.cpp MatrixStack.cpp modelerapp.cpp modelerui.cpp ModelerView.cpp Joint.cpp SkeletalModel.cpp Mesh.cpp main.cpp
OBJS = $(SRCS:.cpp=.o)
PROG = a2
all: $(SRCS) $(PROG)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $@ $(LINKFLAGS) $(FRAMEWORKS)
.cpp.o:
$(CC) $(CFLAGS) $< -c -o $@ $(INCFLAGS)
depend:
makedepend $(INCFLAGS) -Y $(SRCS)
clean:
rm $(OBJS) $(PROG)
bitmap.o: bitmap.h
camera.o: camera.h
Mesh.o: Mesh.h
MatrixStack.o: MatrixStack.h
modelerapp.o: modelerapp.h ModelerView.h modelerui.h bitmap.h camera.h
modelerui.o: modelerui.h ModelerView.h bitmap.h camera.h modelerapp.h
ModelerView.o: ModelerView.h camera.h
SkeletalModel.o: MatrixStack.h ModelerView.h Joint.h modelerapp.h