forked from krishauser/Klampt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.config.tmpl
executable file
·135 lines (112 loc) · 3.42 KB
/
Makefile.config.tmpl
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
##################################################
# Custom Makefile configuration
##################################################
##################################################
# Edit the following to suit your configuration
##################################################
## Default Settings
TINYXML = Library/tinyxml
#GLUT = Library/glut-3.7
GLUI = Library/glui-2.36/src
#GLPK = Library/glpk-4.8
ODE = Library/ode-0.11.1
KRISLIB = Library/KrisLibrary
FREEGLUT = 0
ODEDOUBLE=1
## Mac Settings
#TINYXML = Library/tinyxml
#GLUT = /System/Library/Frameworks/GLUT.framework
#GLUI = /opt/local
#GLPK = /opt/local
#ODE = /opt/local
#KRISLIB = Library/KrisLibrary
#FREEGLUT = 0
#ODEDOUBLE=1
## Turn this on if you built KrisLibrary with Assimp loading
HAVE_ASSIMP=0
ASSIMP=Library/assimp--3.0.1270-sdk
##################################################
# Probably don't have to modify the following,
# but can if needed
##################################################
CC = g++
uname := $(shell sh -c 'uname 2>/dev/null || echo not')
uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
CYGWIN = 0
LINUX = 0
MAC_OS_X = 0
ifeq ($(uname_O),Cygwin)
CYGWIN = 1
endif
ifeq ($(uname),Linux)
LINUX = 1
endif
ifeq (OSTYPE,MacOSX)
MAC_OS_X = 1
endif
ifeq ($(MAC_OS_X),1)
DEFINES += MAC_OS_X
endif
ifeq ($(LINUX),1)
DEFINES += LINUX
endif
ifeq ($(CYGWIN),1)
DEFINES += CYGWIN
endif
ODECONFIG = --enable-shared --with-trimesh=none
ifeq ($(ODEDOUBLE),1)
DEFINES += dDOUBLE
ODECONFIG += --enable-double-precision
endif
# if you're running cygwin on windows, this allows you to build GestureGUI
#DEFINES += WM_TOUCH_SUPPORT
# this allows you to use the 3Dconnexion mouse
#DEFINES += THREED_MOUSE_SUPPORT
#edit these flags if desired, they're passed to gcc
CPPFLAGS= -g -fPIC -O2 -Wall -Wno-uninitialized
ifeq ($(CYGWIN),1) #different paths for cygwin
ifeq ($(FREEGLUT),1)
GLUTLIBDIR = $(GLUI)/lib /usr/local/lib /usr/X11R6/lib
GLLIBS = opengl32
GLUTLIBS = glui glut glu32 opengl32 winmm gdi32 m
else
GLUTLIBDIR = $(GLUI)/lib
GLLIBS = opengl32
GLUTLIBS = glui glut32 glu32 opengl32 m
endif
else
ifeq ($(MAC_OS_X),1)
GLUTLIBS = glui glut GL m GLU Xi Xext Xmu X11
GLUTLIBDIR = $(GLUI)/lib $(GLUT) /usr/X11R6/lib
else
GLUTLIBS = glui glut GL m GLU Xm Xi Xext Xmu X11
GLUTLIBDIR = $(GLUI)/lib $(GLUT)/lib/glut /usr/X11R6/lib /usr/X11R6/lib/modules/extensions
endif
endif
#May have to add $(GLUT)/include to the following line
#GLUTINCLUDE = $(GLUT)/include $(GLUI)/include/GL
GLUTINCLUDE = $(GLUI)/include/GL
PQPLIBDIR = $(PQP)/lib
#Uncomment this if ODE was built using 'make'
ODELIBDIR = $(ODE)/ode/src/.libs
#uncomment this if ODE was built using 'make install'
#ODELIBDIR = /usr/local/lib
TINYXMLLIBDIR = $(TINYXML)
KRISLIBINCLUDE = $(KRISLIB)
KRISLIBDIR = $(KRISLIB)/lib
#compile with TinyXML STL support
DEFINES += TIXML_USE_STL
#defines for Makefile and Makefile.template
ifeq ($(MAC_OS_X),1)
INCDIRS = .. ../$(KRISLIBINCLUDE) $(GLUTINCLUDE) $(ODE)/include ../$(TINYXML)
LIBDIRS = $(GLUTLIBDIR) $(GLPK) $(KRISLIBDIR) $(ODELIBDIR) $(TINYXMLLIBDIR)
else
INCDIRS = .. ../$(KRISLIBINCLUDE) $(addprefix ../,$(GLUTINCLUDE)) ../$(ODE)/include ../$(TINYXML)
LIBDIRS = $(GLUTLIBDIR) $(GLPK)/src $(KRISLIBDIR) $(ODELIBDIR) $(TINYXMLLIBDIR)
endif
LIBS = KrisLibrary $(GLUTLIBS) ode tinyxml glpk stdc++
ifeq ($(HAVE_ASSIMP),1)
ASSIMPLIBDIR=$(ASSIMP)/lib
LIBDIRS += $(ASSIMPLIBDIR)
LIBS += assimp
endif