-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (33 loc) · 825 Bytes
/
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
PLATFORM = $(shell uname)
## Compilation flags
##comment out one or the other
##debugging
CFLAGS = -g
##release
#CFLAGS = -O3 -DNDEBUG
LDFLAGS=
CFLAGS+= -Wall
ifeq ($(PLATFORM),Darwin)
## Mac OS X
CFLAGS += -m64 -Wno-deprecated
INCLUDEPATH=-I/system/usr/local/include
LDFLAGS+= -m64 -lc -framework AGL -framework OpenGL -framework GLUT -framework Foundation
else
## Linux
CFLAGS += -m64
INCLUDEPATH = -I/usr/include/GL/
LIBPATH = -L/usr/lib64 -L/usr/X11R6/lib
LDFLAGS+= -lGL -lglut -lrt -lGLU -lX11 -lm -lXmu -lXext -lXi
endif
CC = g++ -O3 -Wall $(INCLUDEPATH)
PROGS = 3dof
default: $(PROGS)
3dof: 3dof.o geom.o
$(CC) -o $@ 3dof.o geom.o $(LDFLAGS)
3dof.o: 3dof.cpp geom.h
$(CC) -c $(CFLAGS) 3dof.cpp -o $@
geom.o: geom.cpp geom.h
$(CC) -c $(CFLAGS) geom.cpp -o $@
clean:
rm *.o
rm 3dof