devel.mk 15.9 KB
Newer Older
Florent Lamiraux's avatar
Florent Lamiraux committed
1
2
3
4
5
6
#
# Copyright (c) 2014 CNRS-LAAS
# Author: Florent Lamiraux
#

FCL_REPO=https://github.com/flexible-collision-library
Florent Lamiraux's avatar
Florent Lamiraux committed
7
8
LAAS_REPO=https://github.com/laas
HPP_REPO=https://github.com/humanoid-path-planner
9
SOT_REPO=https://github.com/stack-of-tasks
10
GEPETTO_REPO=https://github.com/Gepetto
11
TRAC_REPO=ssh://trac.laas.fr/git/jrl/robots/ros-hrp2
12
LOCO3D_REPO=https://github.com/loco-3d
Florent Lamiraux's avatar
Florent Lamiraux committed
13

14
15
16
17
SRC_DIR=${DEVEL_HPP_DIR}/src
ifndef INSTALL_HPP_DIR
INSTALL_HPP_DIR=${DEVEL_HPP_DIR}/install
endif
18

19
20
BUILD_TYPE?=Release
BUILD_TESTING?=ON
21
22
23
24
ifeq (${BUILD_TYPE},Debug)
  BUILD_FOLDER=build
else
  BUILD_FOLDER=build-rel
25
  BUILD_TESTING=OFF
26
endif
Florent Lamiraux's avatar
Florent Lamiraux committed
27

Joseph Mirabel's avatar
Joseph Mirabel committed
28
OSG_PACKAGE=osg-dae
29
#OSG_PACKAGE=OpenSceneGraph-3.4.0
30

Florent Lamiraux's avatar
Florent Lamiraux committed
31
32
33
34
WGET=wget --quiet
UNZIP=unzip -qq
TAR=tar
GIT_QUIET=--quiet
35
36
# Qt version should be either 4 or 5
QT_VERSION=4
37
INSTALL_DOCUMENTATION=ON
Florent Lamiraux's avatar
Florent Lamiraux committed
38

39
40
41
##################################
# {{{ Dependencies

42
pinocchio_branch=v2.4.7
43
pinocchio_repository=${SOT_REPO}
Guilhem Saurel's avatar
Guilhem Saurel committed
44
pinocchio_extra_flags= -DBUILD_PYTHON_INTERFACE=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_WITH_COLLISION_SUPPORT=ON
Florent Lamiraux's avatar
Florent Lamiraux committed
45

46
hpp-template-corba_branch=devel
47
hpp-template-corba_repository=${HPP_REPO}
48

49
50
51
# }}}
##################################
# {{{ Packages supporting HPP_VERSION
52

Guilhem Saurel's avatar
Guilhem Saurel committed
53
# Either a version tag (e.g. v4.3.0), stable or devel
54
HPP_VERSION=devel
55
HPP_EXTRA_FLAGS= -DBUILD_TESTING=${BUILD_TESTING}$
56

57
hpp-util_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
58
59
hpp-util_repository=${HPP_REPO}

60
hpp-fcl_branch=${HPP_VERSION}
61
hpp-fcl_repository=${HPP_REPO}
62
hpp-fcl_extra_flags= -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_INTERFACE=OFF
63

64
hpp-statistics_branch=${HPP_VERSION}
65
hpp-statistics_repository=${HPP_REPO}
66

67
hpp-pinocchio_branch=${HPP_VERSION}
68
hpp-pinocchio_repository=${HPP_REPO}
69
hpp-pinocchio_extra_flags=${HPP_EXTRA_FLAGS}
70

71
hpp-constraints_branch=${HPP_VERSION}
72
hpp-constraints_repository=${HPP_REPO}
73
hpp-constraints_extra_flags=${HPP_EXTRA_FLAGS} -DUSE_QPOASES=OFF
74

75
hpp-core_branch=${HPP_VERSION}
76
hpp-core_repository=${HPP_REPO}
77
hpp-core_extra_flags=${HPP_EXTRA_FLAGS}
Florent Lamiraux's avatar
Florent Lamiraux committed
78

79
hpp-corbaserver_branch=${HPP_VERSION}
80
hpp-corbaserver_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
81

82
hpp-walkgen_branch=${HPP_VERSION}
Joseph Mirabel's avatar
Joseph Mirabel committed
83
84
hpp-walkgen_repository=${HPP_REPO}

85
hpp-wholebody-step_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
86
hpp-wholebody-step_repository=${HPP_REPO}
87
hpp-wholebody-step_extra_flags= -DRUN_TESTS=OFF
Florent Lamiraux's avatar
Florent Lamiraux committed
88

89
hpp-doc_branch=${HPP_VERSION}
90
hpp-doc_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
91

92
hpp-manipulation_branch=${HPP_VERSION}
93
hpp-manipulation_repository=${HPP_REPO}
94
hpp-manipulation_extra_flags=-DHPP_MANIPULATION_HAS_WHOLEBODY_STEP=FALSE
95

96
hpp-manipulation-urdf_branch=${HPP_VERSION}
97
hpp-manipulation-urdf_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
98

99
hpp-manipulation-corba_branch=${HPP_VERSION}
100
hpp-manipulation-corba_repository=${HPP_REPO}
101

102
hpp_tutorial_branch=${HPP_VERSION}
103
hpp_tutorial_repository=${HPP_REPO}
104

105
hpp-gepetto-viewer_branch=${HPP_VERSION}
106
hpp-gepetto-viewer_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
107

108
hpp-plot_branch=${HPP_VERSION}
109
hpp-plot_repository=${HPP_REPO}
110

111
hpp-gui_branch=${HPP_VERSION}
112
hpp-gui_repository=${HPP_REPO}
113

114
115
116
# }}}
##################################
# {{{ Robot specific package + test packages
117

118
example-robot-data_branch=devel
119
example-robot-data_repository=${GEPETTO_REPO}
120
example-robot-data_extra_flags= -DBUILD_PYTHON_INTERFACE=OFF
121

Florent Lamiraux's avatar
Florent Lamiraux committed
122
hrp2-14-description_branch=master
123
hrp2-14-description_repository=${TRAC_REPO}
124

125
hpp-hrp2_branch=devel
126
hpp-hrp2_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
127

128
129
robot_capsule_urdf_branch=groovy
robot_capsule_urdf_repository=${LAAS_REPO}
130

131
132
robot_model_py_branch=groovy
robot_model_py_repository=${LAAS_REPO}
133

134
iai_maps_branch=devel
135
136
iai_maps_repository=${HPP_REPO}

137
hpp_benchmark_branch=devel
138
hpp_benchmark_repository=${HPP_REPO}
139

140
hpp-environments_branch=${HPP_VERSION}
141
142
hpp-environments_repository=${HPP_REPO}

143
universal_robot_branch=kinetic
Florent Lamiraux's avatar
Florent Lamiraux committed
144
145
universal_robot_repository=${HPP_REPO}

146
hpp-universal-robot_branch=${HPP_VERSION}
Guilhem Saurel's avatar
Guilhem Saurel committed
147
hpp-universal-robot_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
148

149
hpp-baxter_branch=${HPP_VERSION}
150
151
hpp-baxter_repository=${HPP_REPO}

152
hpp_romeo_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
153
hpp_romeo_repository=${HPP_REPO}
154

155
156
157
158
159

# }}}
##################################
# {{{ Packages for rbprm

160
hpp-affordance_branch=${HPP_VERSION}
161
162
163
hpp-affordance_repository=${HPP_REPO}
hpp-affordance_extra_flags=${HPP_EXTRA_FLAGS}

164
hpp-affordance-corba_branch=${HPP_VERSION}
165
166
167
hpp-affordance-corba_repository=${HPP_REPO}
hpp-affordance-corba_extra_flags=${HPP_EXTRA_FLAGS}

168
talos-rbprm_branch=${HPP_VERSION}
169
170
talos-rbprm_repository=${HPP_REPO}

171
hpp-rbprm_branch=${HPP_VERSION}
172
173
174
hpp-rbprm_repository=${HPP_REPO}
hpp-rbprm_extra_flags=${HPP_EXTRA_FLAGS}

175
hpp-rbprm-robot-data_branch=${HPP_VERSION}
176
177
hpp-rbprm-robot-data_repository=${HPP_REPO}

178
hpp-rbprm-corba_branch=${HPP_VERSION}
179
180
181
hpp-rbprm-corba_repository=${HPP_REPO}
hpp-rbprm-corba_extra_flags=${HPP_EXTRA_FLAGS}

182
hpp-centroidal-dynamics_branch=${HPP_VERSION}
183
184
hpp-centroidal-dynamics_repository=${HPP_REPO}

185
hpp-bezier-com-traj_branch=${HPP_VERSION}
186
187
188
hpp-bezier-com-traj_repository=${HPP_REPO}
hpp-bezier-com-traj_extra_flags= -DBUILD_PYTHON_INTERFACE=ON

189
curves_branch=${HPP_VERSION}
190
191
curves_repository=${LOCO3D_REPO}
curves_extra_flags= -DBUILD_PYTHON_INTERFACE=ON
192

193
eigenpy_branch=v2.3.2
194
195
eigenpy_repository=${SOT_REPO}

196
197
198
199
200
201
202
203
204
205
# }}}
##################################
# {{{ Packages for gepetto-gui

collada-dom_branch=master
collada-dom_repository=${HPP_REPO}
collada-dom_extra_flags=-DBUILD_SHARED_LIBS=TRUE -DOPT_COLLADA15=FALSE

osg-dae_branch=master
osg-dae_repository=${GEPETTO_REPO}
Joseph Mirabel's avatar
Joseph Mirabel committed
206
osg-dae_extra_flags= -DCOLLADA_DYNAMIC_LIBRARY=${INSTALL_HPP_DIR}/lib/libcollada14dom.so -DCOLLADA_INCLUDE_DIR=${INSTALL_HPP_DIR}/include/collada-dom
207
OpenSceneGraph-3.4.0_extra_flags= -DDESIRED_QT_VERSION=${QT_VERSION} -DCOLLADA_DYNAMIC_LIBRARY=${INSTALL_HPP_DIR}/lib/libcollada14dom.so -DCOLLADA_INCLUDE_DIR=${INSTALL_HPP_DIR}/include/collada-dom -DLIB_POSTFIX=""
208

209
gepetto-viewer_branch=${HPP_VERSION}
210
gepetto-viewer_repository=${GEPETTO_REPO}
211
ifeq (${QT_VERSION}, 5)
212
	gepetto-viewer_extra_flags= -DPROJECT_USE_QT4=OFF
213
else
214
	gepetto-viewer_extra_flags= -DPROJECT_USE_QT4=ON
215
endif
Florent Lamiraux's avatar
Florent Lamiraux committed
216

217
gepetto-viewer-corba_branch=${HPP_VERSION}
Guilhem Saurel's avatar
Guilhem Saurel committed
218
219
gepetto-viewer-corba_repository=${GEPETTO_REPO}

220
pythonqt_branch=qt${QT_VERSION}
221
pythonqt_repository=${GEPETTO_REPO}
222
223
pythonqt_extra_flags= -DPythonQt_Wrap_QtAll=ON -DPythonQt_Extensions=ON

224
qgv_branch=devel
225
qgv_repository=${HPP_REPO}
Joseph Mirabel's avatar
Joseph Mirabel committed
226
227
228
229
230
ifeq (${QT_VERSION}, 5)
	qgv_extra_flags=-DBINDINGS_QT5=ON -DBINDINGS_QT4=OFF
else
	qgv_extra_flags=-DBINDINGS_QT5=OFF -DBINDINGS_QT4=ON
endif
231

232
hpp-tools_branch=${HPP_VERSION}
233
hpp-tools_repository=${HPP_REPO}
234
hpp-tools_extra_flags=
235

236
237
238
239
# }}}
##################################
# {{{ High-level targets

240
all: hpp_tutorial.install hpp-gepetto-viewer.install hpp-plot.install hpp-gui.install
241
	${MAKE} hpp-doc.install
Florent Lamiraux's avatar
Florent Lamiraux committed
242

243
# For test on gepgitlab, install robot packages first
244
245
test-ci: example-robot-data.install  hpp-environments.install \
	hpp-baxter.install
246
	${MAKE} hpp_tutorial.install hpp-gepetto-viewer.install hpp-rbprm-corba.install \
Guilhem Saurel's avatar
Guilhem Saurel committed
247
	hpp-universal-robot.install && \
248
249
250
	${MAKE} hpp-doc.install

# For benchmark, install robot packages first
251
benchmark: example-robot-data.install \
252
	hpp-environments.install hrp2-14-description.install
253
	${MAKE} hpp_tutorial.install hpp-gepetto-viewer.install; \
254
	${MAKE} hpp-baxter.install hpp_romeo.install \
Guilhem Saurel's avatar
Guilhem Saurel committed
255
	hpp-universal-robot.install hpp-plot.install hpp-gui.install; \
256
	${MAKE} hpp_benchmark.checkout; \
257
	${MAKE} hpp-doc.install
258

259
260
261
262
rbprm: hpp-rbprm-corba.install hpp-gepetto-viewer.install
	${MAKE} hpp-doc.install


263
264
265
266
# }}}
##################################
# {{{ Dependencies declaration

267
hpp-doc.configure.dep: hpp-doc.checkout
268
hpp-fcl.configure.dep: hpp-fcl.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
269
hpp-walkgen.configure.dep: hpp-util.install hpp-core.install \
270
	hpp-walkgen.checkout
271
272
hpp-util.configure.dep: hpp-util.checkout
hpp-model-urdf.configure.dep: hpp-model.install hpp-model-urdf.checkout
273
pinocchio.configure.dep: hpp-fcl.install pinocchio.checkout
274
275
hpp-pinocchio.configure.dep: pinocchio.install hpp-util.install \
	hpp-pinocchio.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
276
hpp-statistics.configure.dep: hpp-util.install hpp-statistics.checkout
277
278
hpp-core.configure.dep: example-robot-data.install hpp-constraints.install \
	hpp-statistics.install hpp-core.checkout
Guilhem Saurel's avatar
Guilhem Saurel committed
279
hpp-constraints.configure.dep: hpp-pinocchio.install hpp-statistics.install \
280
	hpp-constraints.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
281
hpp-wholebody-step.configure.dep: hpp-constraints.install hpp-walkgen.install \
282
283
	hpp-wholebody-step.checkout
hpp-manipulation.configure.dep: hpp-core.install hpp-constraints.install \
Florent Lamiraux's avatar
Florent Lamiraux committed
284
	hpp-manipulation.checkout
285
hpp-manipulation-corba.configure.dep: hpp-manipulation-urdf.install \
286
287
	hpp-manipulation.install hpp-corbaserver.install \
	hpp-template-corba.install hpp-manipulation-corba.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
288
289
hpp-plot.configure.dep: hpp-corbaserver.install hpp-manipulation-corba.install \
	qgv.install hpp-plot.checkout
290
hpp-manipulation-urdf.configure.dep:hpp-manipulation.install \
291
	hpp-manipulation-urdf.checkout
292
hpp-corbaserver.configure.dep: hpp-core.install hpp-template-corba.install \
293
294
	hpp-constraints.install hpp-corbaserver.checkout
hpp-template-corba.configure.dep: hpp-util.install hpp-template-corba.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
295
296
qgv.configure.dep: qgv.checkout
pythonqt.configure.dep: pythonqt.checkout
297
298
299
robot_model_py.configure.dep: robot_model_py.checkout
robot_capsule_urdf.configure.dep: robot_model_py.install \
	robot_capsule_urdf.checkout
300
301
302
303
hpp-hrp2.configure.dep: hrp2-14-description.install hpp-corbaserver.install \
	hpp-hrp2.checkout
hrp2-14-description.configure.dep: robot_capsule_urdf.install \
	robot_model_py.install hrp2-14-description.checkout
304
test-hpp.configure.dep: hpp-wholebody-step.install \
305
	hpp-gepetto-viewer.install hpp-hrp2.install test-hpp.checkout
306
iai_maps.configure.dep: iai_maps.checkout
307
hpp_tutorial.configure.dep: hpp-gepetto-viewer.install iai_maps.install \
308
	hpp-manipulation-corba.install hpp_tutorial.checkout
309
hpp_benchmark.configure.dep: hpp_benchmark.checkout
310
collada-dom.configure.dep: collada-dom.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
311
312
osg-dae.configure.dep: collada-dom.install \
	osg-dae.checkout
313
314
OpenSceneGraph-3.4.0.configure.dep: collada-dom.install \
	OpenSceneGraph-3.4.0.checkout
315
gepetto-viewer.configure.dep: pythonqt.install gepetto-viewer.checkout
316
gepetto-viewer-corba.configure.dep: gepetto-viewer.install \
317
	pythonqt.install gepetto-viewer-corba.checkout
318
hpp-gepetto-viewer.configure.dep: gepetto-viewer-corba.install \
Florent Lamiraux's avatar
Florent Lamiraux committed
319
	hpp-corbaserver.install \
320
	hpp-gepetto-viewer.checkout
321
hpp-gui.configure.dep: hpp-gui.checkout
322
universal_robot.configure.dep: universal_robot.checkout
323
hpp-universal-robot.configure.dep: example-robot-data.install \
Guilhem Saurel's avatar
Guilhem Saurel committed
324
	hpp-universal-robot.checkout
325
example-robot-data.configure.dep: example-robot-data.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
326
hpp-environments.configure.dep: hpp-environments.checkout
327
328
hpp-baxter.configure.dep: hpp-baxter.checkout
hpp_romeo.configure.dep: hpp_romeo.checkout
329
330
331
hpp-affordance.configure.dep: hpp-core.install hpp-fcl.install hpp-affordance.checkout
hpp-affordance-corba.configure.dep: hpp-affordance.install hpp-template-corba.install \
 hpp-corbaserver.install hpp-affordance-corba.checkout
332
333
334
335
talos-rbprm.configure.dep: talos-rbprm.checkout
hpp-rbprm.configure.dep: hpp-core.install hpp-centroidal-dynamics.install \
	hpp-rbprm-robot-data.install hpp-affordance.install curves.install \
	hpp-bezier-com-traj.install talos-rbprm.install hpp-rbprm.checkout
336
337
338
339
hpp-rbprm-robot-data.configure.dep: hpp-rbprm-robot-data.checkout
hpp-rbprm-corba.configure.dep: hpp-rbprm.install hpp-affordance-corba.install \
 hpp-corbaserver.install hpp-rbprm-robot-data.install hpp-rbprm-corba.checkout
hpp-centroidal-dynamics.configure.dep: eigenpy.install hpp-centroidal-dynamics.checkout
340
341
hpp-bezier-com-traj.configure.dep: hpp-centroidal-dynamics.install curves.install hpp-bezier-com-traj.checkout
curves.configure.dep: curves.checkout
342
eigenpy.configure.dep: eigenpy.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
343
hpp-tools.configure.dep: hpp-tools.checkout
344

345
346
347
348
# }}}
##################################
# {{{ Targets

349
status:
350
351
352
	@for child_dir in $$(ls ${SRC_DIR}); do \
		test -d "$$child_dir" || continue; \
		test -d "$$child_dir/.git" || continue; \
Florent Lamiraux's avatar
Florent Lamiraux committed
353
		${MAKE} "$$child_dir".status; \
354
	done
355

Florent Lamiraux's avatar
Florent Lamiraux committed
356
357
358
359
360
361
362
log:
	@for child_dir in $$(ls ${SRC_DIR}); do \
		test -d "$$child_dir" || continue; \
		test -d "$$child_dir/.git" || continue; \
		${MAKE} "$$child_dir".log; \
	done

363
364
365
366
367
368
369
fetch:
	@for child_dir in $$(ls ${SRC_DIR}); do \
		test -d "$$child_dir" || continue; \
		test -d "$$child_dir/.git" || continue; \
		${MAKE} "$$child_dir".fetch; \
	done

370
update:
371
372
373
374
375
	@for child_dir in $$(ls ${SRC_DIR}); do \
		test -d "$$child_dir" || continue; \
		test -d "$$child_dir/.git" || continue; \
		${MAKE} "$$child_dir".update; \
	done
Florent Lamiraux's avatar
Florent Lamiraux committed
376
377
378

%.checkout:
	if [ -d $(@:.checkout=) ]; then \
379
		echo "$(@:.checkout=) already checkout out."; \
Florent Lamiraux's avatar
Florent Lamiraux committed
380
	else \
Florent Lamiraux's avatar
Florent Lamiraux committed
381
		git clone ${GIT_QUIET} --recursive -b ${$(@:.checkout=)_branch} ${$(@:.checkout=)_repository}/$(@:.checkout=); \
Florent Lamiraux's avatar
Florent Lamiraux committed
382
383
	fi \

384
385
386
387
388
389
%.fetch:
	if [ "${$(@:.fetch=)_repository}" = "" ]; then \
		echo "$(@:.fetch=) is not referenced"; \
	else \
		cd ${SRC_DIR}/$(@:.fetch=);\
		git fetch ${GIT_QUIET} origin; \
390
		git fetch ${GIT_QUIET} origin --tags; \
391
392
	fi

Florent Lamiraux's avatar
Florent Lamiraux committed
393
%.update:
394
395
396
397
398
399
400
	if [ "${$(@:.update=)_repository}" = "" ]; then \
		echo "$(@:.update=) is not referenced"; \
	else \
		cd ${SRC_DIR}/$(@:.update=);\
		git remote rm origin;\
		git remote add origin ${$(@:.update=)_repository}/$(@:.update=);\
		git fetch origin;\
401
		git fetch origin --tags;\
Florent Lamiraux's avatar
Florent Lamiraux committed
402
403
404
		git checkout -q --detach;\
		git branch -f ${$(@:.update=)_branch} origin/${$(@:.update=)_branch};\
		git checkout -q ${$(@:.update=)_branch};\
405
406
407
		git submodule update; \
	fi

Florent Lamiraux's avatar
Florent Lamiraux committed
408

409
410
%.configure.dep: %.checkout

Florent Lamiraux's avatar
Florent Lamiraux committed
411
412
%.configure: %.configure.dep
	${MAKE} $(@:.configure=).configure_nodep
413

Florent Lamiraux's avatar
Florent Lamiraux committed
414
415
416
%.configure_nodep:%.checkout
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
417
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
418
419
420
			-DINSTALL_DOCUMENTATION=${INSTALL_DOCUMENTATION} \
			-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -DNDEBUG" \
			${$(@:.configure_nodep=)_extra_flags} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
421

Florent Lamiraux's avatar
Florent Lamiraux committed
422
%.install:%.configure
423
424
	${MAKE} -C ${SRC_DIR}/$(@:.install=)/${BUILD_FOLDER} install

Florent Lamiraux's avatar
Florent Lamiraux committed
425
426
%.install_nodep:%.configure_nodep
	${MAKE} -C ${SRC_DIR}/$(@:.install_nodep=)/${BUILD_FOLDER} install
Florent Lamiraux's avatar
Florent Lamiraux committed
427
428

%.uninstall:
429
	${MAKE} -C ${SRC_DIR}/$(@:.uninstall=)/${BUILD_FOLDER} uninstall
Florent Lamiraux's avatar
Florent Lamiraux committed
430
431

%.clean:
432
	${MAKE} -C ${SRC_DIR}/$(@:.clean=)/${BUILD_FOLDER} clean
Florent Lamiraux's avatar
Florent Lamiraux committed
433

434
%.very-clean:
435
	rm -rf ${SRC_DIR}/$(@:.very-clean=)/${BUILD_FOLDER}/*
436

Florent Lamiraux's avatar
Florent Lamiraux committed
437
%.status:
Florent Lamiraux's avatar
Florent Lamiraux committed
438
439
440
441
	@cd ${SRC_DIR}/$(@:.status=); \
	echo \
	"\033[1;36m------- Folder $(@:.status=) ---------------\033[0m"; \
	git --no-pager -c status.showUntrackedFiles=no status --short --branch;\
Florent Lamiraux's avatar
Florent Lamiraux committed
442

Florent Lamiraux's avatar
Florent Lamiraux committed
443
444
445
446
447
448
449
%.log:
	@cd ${SRC_DIR}/$(@:.log=); \
	if [ -f .git/refs/heads/${$(@:.log=)_branch} ]; then \
		echo -n "$(@:.log=): "; \
		cat .git/refs/heads/${$(@:.log=)_branch}; \
	fi

450
451
452
453
454
455
456
457
458
OpenSceneGraph-3.4.0.checkout:
	if [ -d $(@:.checkout=) ]; then \
		echo "$(@:.checkout=) already checkout out."; \
	else \
		wget http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-3.4.0/source/OpenSceneGraph-3.4.0.zip;\
		cd ${SRC_DIR}; unzip OpenSceneGraph-3.4.0.zip;\
		rm -f OpenSceneGraph-3.4.0.zip;\
	fi

459
robot_model_py.configure: robot_model_py.configure.dep
Florent Lamiraux's avatar
Florent Lamiraux committed
460
	cd ${SRC_DIR}/$(@:.configure=)/xml_reflection;\
461
462
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
463
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
464
	cd ${SRC_DIR}/$(@:.configure=)/urdf_parser_py;\
465
466
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
467
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Marine Heckler's avatar
Marine Heckler committed
468

Florent Lamiraux's avatar
Florent Lamiraux committed
469
robot_model_py.install: robot_model_py.configure
470
471
	${MAKE} -C ${SRC_DIR}/$(@:.install=)/xml_reflection/${BUILD_FOLDER} install; \
	${MAKE} -C ${SRC_DIR}/$(@:.install=)/urdf_parser_py/${BUILD_FOLDER} install;
Florent Lamiraux's avatar
Florent Lamiraux committed
472
473
474
475

universal_robot.configure_nodep:
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
476
	cmake -DCMAKE_INSTALL_PREFIX=${DEVEL_HPP_DIR}/install -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -DNDEBUG" ${$(@:.configure_nodep=)_extra_flags} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
477
478
479
480
481
482
483
484

universal_robot.install_nodep:universal_robot.configure_nodep
	cd ${SRC_DIR}/$(@:.install_nodep=)/ur_description/${BUILD_FOLDER};\
	make install

universal_robot.install:universal_robot.configure
	cd ${SRC_DIR}/$(@:.install=)/ur_description/${BUILD_FOLDER};\
	make install
Florent Lamiraux's avatar
Florent Lamiraux committed
485

486
487
488
# }}}

# vim: foldmethod=marker foldlevel=0