Makefile 16.7 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

Florent Lamiraux's avatar
Florent Lamiraux committed
19
# Whether to compute humanoid specific part
20
HUMANOID?=TRUE
Florent Lamiraux's avatar
Florent Lamiraux committed
21

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

Joseph Mirabel's avatar
Joseph Mirabel committed
31
OSG_PACKAGE=osg-dae
32
#OSG_PACKAGE=OpenSceneGraph-3.4.0
33

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

42
43
44
##################################
# {{{ Dependencies

Guilhem Saurel's avatar
Guilhem Saurel committed
45
pinocchio_branch=v2.5.3
46
pinocchio_repository=${SOT_REPO}
Guilhem Saurel's avatar
Guilhem Saurel committed
47
pinocchio_extra_flags= -DBUILD_PYTHON_INTERFACE=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_WITH_COLLISION_SUPPORT=ON
Florent Lamiraux's avatar
Florent Lamiraux committed
48

Guilhem Saurel's avatar
Guilhem Saurel committed
49
hpp-template-corba_branch=v4.10.0
50
hpp-template-corba_repository=${HPP_REPO}
51

52
53
54
# }}}
##################################
# {{{ Packages supporting HPP_VERSION
55

56
# Either a version tag (e.g. v4.3.0), master or devel
57
HPP_EXTRA_FLAGS= -DBUILD_TESTING=${BUILD_TESTING}$
58

Guilhem Saurel's avatar
Guilhem Saurel committed
59
hpp-util_branch=v4.10.1
Florent Lamiraux's avatar
Florent Lamiraux committed
60
61
hpp-util_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
62
hpp-fcl_branch=v1.6.0
63
hpp-fcl_repository=${HPP_REPO}
64
hpp-fcl_extra_flags= -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_INTERFACE=OFF
65

Guilhem Saurel's avatar
Guilhem Saurel committed
66
hpp-statistics_branch=v4.10.1
67
hpp-statistics_repository=${HPP_REPO}
68

Guilhem Saurel's avatar
Guilhem Saurel committed
69
hpp-pinocchio_branch=v4.10.2
70
hpp-pinocchio_repository=${HPP_REPO}
71
hpp-pinocchio_extra_flags=${HPP_EXTRA_FLAGS}
72

Guilhem Saurel's avatar
Guilhem Saurel committed
73
hpp-constraints_branch=v4.10.1
74
hpp-constraints_repository=${HPP_REPO}
75
hpp-constraints_extra_flags=${HPP_EXTRA_FLAGS} -DUSE_QPOASES=OFF
76

Guilhem Saurel's avatar
Guilhem Saurel committed
77
hpp-core_branch=v4.10.1
78
hpp-core_repository=${HPP_REPO}
79
hpp-core_extra_flags=${HPP_EXTRA_FLAGS}
Florent Lamiraux's avatar
Florent Lamiraux committed
80

Guilhem Saurel's avatar
Guilhem Saurel committed
81
hpp-corbaserver_branch=v4.10.1
82
hpp-corbaserver_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
83

Guilhem Saurel's avatar
Guilhem Saurel committed
84
hpp-walkgen_branch=v4.10.1
Joseph Mirabel's avatar
Joseph Mirabel committed
85
86
hpp-walkgen_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
87
hpp-wholebody-step_branch=v4.10.1
Florent Lamiraux's avatar
Florent Lamiraux committed
88
hpp-wholebody-step_repository=${HPP_REPO}
89
hpp-wholebody-step_extra_flags= -DRUN_TESTS=OFF
Florent Lamiraux's avatar
Florent Lamiraux committed
90

Florent Lamiraux's avatar
Florent Lamiraux committed
91
hpp-doc_branch=master
92
hpp-doc_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
93

Guilhem Saurel's avatar
Guilhem Saurel committed
94
hpp-manipulation_branch=v4.10.1
95
hpp-manipulation_repository=${HPP_REPO}
96

Guilhem Saurel's avatar
Guilhem Saurel committed
97
hpp-manipulation-urdf_branch=v4.10.1
98
hpp-manipulation-urdf_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
99

Guilhem Saurel's avatar
Guilhem Saurel committed
100
hpp-manipulation-corba_branch=v4.10.1
101
hpp-manipulation-corba_repository=${HPP_REPO}
102

103
104
105
106
107
ifeq (${HUMANOID}, TRUE)
  hpp-manipulation_extra_flags=-DHPP_MANIPULATION_HAS_WHOLEBODY_STEP=TRUE
else
  hpp-manipulation_extra_flags=-DHPP_MANIPULATION_HAS_WHOLEBODY_STEP=FALSE
endif
108

Guilhem Saurel's avatar
Guilhem Saurel committed
109
hpp_tutorial_branch=v4.10.0
110
hpp_tutorial_repository=${HPP_REPO}
111

Guilhem Saurel's avatar
Guilhem Saurel committed
112
hpp-gepetto-viewer_branch=v4.10.1
113
hpp-gepetto-viewer_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
114

Guilhem Saurel's avatar
Guilhem Saurel committed
115
hpp-plot_branch=v4.10.1
116
hpp-plot_repository=${HPP_REPO}
117

Guilhem Saurel's avatar
Guilhem Saurel committed
118
hpp-gui_branch=v4.10.1
119
hpp-gui_repository=${HPP_REPO}
120

Guilhem Saurel's avatar
Guilhem Saurel committed
121
hpp-practicals_branch=v4.10.0
Florent Lamiraux's avatar
Florent Lamiraux committed
122
123
hpp-practicals_repository=${HPP_REPO}

124
125
126
# }}}
##################################
# {{{ Robot specific package + test packages
127

Guilhem Saurel's avatar
Guilhem Saurel committed
128
example-robot-data_branch=v3.6.1
129
example-robot-data_repository=${GEPETTO_REPO}
130
example-robot-data_extra_flags= -DBUILD_PYTHON_INTERFACE=OFF
131

Florent Lamiraux's avatar
Florent Lamiraux committed
132
hrp2-14-description_branch=master
133
hrp2-14-description_repository=${TRAC_REPO}
134

135
hpp-hrp2_branch=v4.9.0
136
hpp-hrp2_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
137

138
139
robot_capsule_urdf_branch=groovy
robot_capsule_urdf_repository=${LAAS_REPO}
140

141
142
robot_model_py_branch=groovy
robot_model_py_repository=${LAAS_REPO}
143

Florent Lamiraux's avatar
Florent Lamiraux committed
144
iai_maps_branch=master
145
146
iai_maps_repository=${HPP_REPO}

147
hpp_benchmark_branch=v4.6.0
148
hpp_benchmark_repository=${HPP_REPO}
149

Guilhem Saurel's avatar
Guilhem Saurel committed
150
hpp-environments_branch=v4.10.1
151
152
hpp-environments_repository=${HPP_REPO}

153
universal_robot_branch=kinetic
Florent Lamiraux's avatar
Florent Lamiraux committed
154
155
universal_robot_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
156
hpp-universal-robot_branch=v4.10.0
Guilhem Saurel's avatar
Guilhem Saurel committed
157
hpp-universal-robot_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
158

Guilhem Saurel's avatar
Guilhem Saurel committed
159
hpp-baxter_branch=v4.10.0
160
161
hpp-baxter_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
162
hpp_romeo_branch=v4.10.0
Florent Lamiraux's avatar
Florent Lamiraux committed
163
hpp_romeo_repository=${HPP_REPO}
164

165
166
167
168
169

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

Guilhem Saurel's avatar
Guilhem Saurel committed
170
hpp-affordance_branch=v4.10.0
171
172
173
hpp-affordance_repository=${HPP_REPO}
hpp-affordance_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
174
hpp-affordance-corba_branch=v4.10.0
175
176
177
hpp-affordance-corba_repository=${HPP_REPO}
hpp-affordance-corba_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
178
179
180
181
182
183
184
185
186
187
anymal-rbprm_branch=v4.10.0
anymal-rbprm_repository=${HPP_REPO}

hyq-rbprm_branch=v4.10.0
hyq-rbprm_repository=${HPP_REPO}

simple-humanoid-rbprm_branch=v4.10.0
simple-humanoid-rbprm_repository=${HPP_REPO}

talos-rbprm_branch=v4.10.0
188
189
talos-rbprm_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
190
hpp-rbprm_branch=v4.10.1
191
192
193
hpp-rbprm_repository=${HPP_REPO}
hpp-rbprm_extra_flags=${HPP_EXTRA_FLAGS}

194
hpp-rbprm-robot-data_branch=v4.9.0
195
196
hpp-rbprm-robot-data_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
197
hpp-rbprm-corba_branch=v4.10.0
198
199
200
hpp-rbprm-corba_repository=${HPP_REPO}
hpp-rbprm-corba_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
201
hpp-centroidal-dynamics_branch=v4.10.0
202
203
hpp-centroidal-dynamics_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
204
hpp-bezier-com-traj_branch=v4.10.1
205
206
207
hpp-bezier-com-traj_repository=${HPP_REPO}
hpp-bezier-com-traj_extra_flags= -DBUILD_PYTHON_INTERFACE=ON

Guilhem Saurel's avatar
Guilhem Saurel committed
208
curves_branch=v0.5.2
209
210
curves_repository=${LOCO3D_REPO}
curves_extra_flags= -DBUILD_PYTHON_INTERFACE=ON
211

Guilhem Saurel's avatar
Guilhem Saurel committed
212
eigenpy_branch=v2.5.0
213
214
eigenpy_repository=${SOT_REPO}

215
216
217
218
219
220
221
222
223
224
# }}}
##################################
# {{{ 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
225
osg-dae_extra_flags= -DCOLLADA_DYNAMIC_LIBRARY=${INSTALL_HPP_DIR}/lib/libcollada14dom.so -DCOLLADA_INCLUDE_DIR=${INSTALL_HPP_DIR}/include/collada-dom
226
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=""
227

Guilhem Saurel's avatar
Guilhem Saurel committed
228
gepetto-viewer_branch=v4.10.1
229
gepetto-viewer_repository=${GEPETTO_REPO}
230
ifeq (${QT_VERSION}, 5)
231
	gepetto-viewer_extra_flags= -DPROJECT_USE_QT4=OFF
232
else
233
	gepetto-viewer_extra_flags= -DPROJECT_USE_QT4=ON
234
endif
Florent Lamiraux's avatar
Florent Lamiraux committed
235

Guilhem Saurel's avatar
Guilhem Saurel committed
236
gepetto-viewer-corba_branch=v5.5.1
Guilhem Saurel's avatar
Guilhem Saurel committed
237
238
gepetto-viewer-corba_repository=${GEPETTO_REPO}

239
pythonqt_branch=qt${QT_VERSION}
240
pythonqt_repository=${GEPETTO_REPO}
241
242
pythonqt_extra_flags= -DPythonQt_Wrap_QtAll=ON -DPythonQt_Extensions=ON

243
qgv_branch=v1.3.0
244
qgv_repository=${HPP_REPO}
Joseph Mirabel's avatar
Joseph Mirabel committed
245
246
247
248
249
ifeq (${QT_VERSION}, 5)
	qgv_extra_flags=-DBINDINGS_QT5=ON -DBINDINGS_QT4=OFF
else
	qgv_extra_flags=-DBINDINGS_QT5=OFF -DBINDINGS_QT4=ON
endif
250

251
hpp-tools_branch=v4.9.0
252
hpp-tools_repository=${HPP_REPO}
253
hpp-tools_extra_flags=
254

255
256
257
258
# }}}
##################################
# {{{ High-level targets

259
all: hpp_tutorial.install hpp-gepetto-viewer.install hpp-plot.install hpp-gui.install
260
	${MAKE} hpp-doc.install
Florent Lamiraux's avatar
Florent Lamiraux committed
261

262
# For test on gepgitlab, install robot packages first
263
264
test-ci: example-robot-data.install  hpp-environments.install \
	hpp-baxter.install
265
	${MAKE} hpp_tutorial.install hpp-gepetto-viewer.install hpp-rbprm-corba.install \
Guilhem Saurel's avatar
Guilhem Saurel committed
266
	hpp-universal-robot.install && \
267
268
269
	${MAKE} hpp-doc.install

# For benchmark, install robot packages first
270
benchmark: example-robot-data.install \
271
	hpp-environments.install hrp2-14-description.install
272
	${MAKE} hpp_tutorial.install hpp-gepetto-viewer.install; \
273
	${MAKE} hpp-baxter.install hpp_romeo.install \
Guilhem Saurel's avatar
Guilhem Saurel committed
274
	hpp-universal-robot.install hpp-plot.install hpp-gui.install; \
275
	${MAKE} hpp_benchmark.checkout; \
276
	${MAKE} hpp-doc.install
277

278
279
280
281
rbprm: hpp-rbprm-corba.install hpp-gepetto-viewer.install
	${MAKE} hpp-doc.install


282
283
284
285
# }}}
##################################
# {{{ Dependencies declaration

286
hpp-doc.configure.dep: hpp-doc.checkout
287
hpp-fcl.configure.dep: hpp-fcl.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
288
hpp-walkgen.configure.dep: hpp-util.install hpp-core.install \
289
	hpp-walkgen.checkout
290
291
hpp-util.configure.dep: hpp-util.checkout
hpp-model-urdf.configure.dep: hpp-model.install hpp-model-urdf.checkout
292
pinocchio.configure.dep: hpp-fcl.install pinocchio.checkout
293
294
hpp-pinocchio.configure.dep: pinocchio.install hpp-util.install \
	hpp-pinocchio.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
295
hpp-statistics.configure.dep: hpp-util.install hpp-statistics.checkout
296
297
hpp-core.configure.dep: example-robot-data.install hpp-constraints.install \
	hpp-statistics.install hpp-core.checkout
Guilhem Saurel's avatar
Guilhem Saurel committed
298
hpp-constraints.configure.dep: hpp-pinocchio.install hpp-statistics.install \
299
	hpp-constraints.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
300
hpp-wholebody-step.configure.dep: hpp-constraints.install hpp-walkgen.install \
301
	hpp-wholebody-step.checkout
302
303
304
305
ifeq (${HUMANOID}, TRUE)
hpp-manipulation.configure.dep: hpp-core.install hpp-constraints.install \
	hpp-wholebody-step.install hpp-manipulation.checkout
hpp-manipulation-corba.configure.dep: hpp-manipulation-urdf.install \
306
	hpp-corbaserver.install hpp-manipulation-corba.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
307
hpp-plot.configure.dep: hpp-corbaserver.install hpp-manipulation-corba.install \
308
	qgv.install hpp-plot.checkout
309
else
310
hpp-manipulation.configure.dep: hpp-core.install hpp-constraints.install \
Florent Lamiraux's avatar
Florent Lamiraux committed
311
	hpp-manipulation.checkout
312
hpp-manipulation-corba.configure.dep: hpp-manipulation-urdf.install \
313
314
	hpp-manipulation.install hpp-corbaserver.install \
	hpp-template-corba.install hpp-manipulation-corba.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
315
316
hpp-plot.configure.dep: hpp-corbaserver.install hpp-manipulation-corba.install \
	qgv.install hpp-plot.checkout
317
endif
318
hpp-manipulation-urdf.configure.dep:hpp-manipulation.install \
319
	hpp-manipulation-urdf.checkout
320
hpp-corbaserver.configure.dep: hpp-core.install hpp-template-corba.install \
321
322
	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
323
324
qgv.configure.dep: qgv.checkout
pythonqt.configure.dep: pythonqt.checkout
325
326
327
robot_model_py.configure.dep: robot_model_py.checkout
robot_capsule_urdf.configure.dep: robot_model_py.install \
	robot_capsule_urdf.checkout
328
329
330
331
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
332
test-hpp.configure.dep: hpp-wholebody-step.install \
333
	hpp-gepetto-viewer.install hpp-hrp2.install test-hpp.checkout
334
iai_maps.configure.dep: iai_maps.checkout
335
hpp_tutorial.configure.dep: hpp-gepetto-viewer.install iai_maps.install \
336
	hpp-manipulation-corba.install hpp_tutorial.checkout
337
hpp_benchmark.configure.dep: hpp_benchmark.checkout
338
collada-dom.configure.dep: collada-dom.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
339
340
osg-dae.configure.dep: collada-dom.install \
	osg-dae.checkout
341
342
OpenSceneGraph-3.4.0.configure.dep: collada-dom.install \
	OpenSceneGraph-3.4.0.checkout
343
gepetto-viewer.configure.dep: pythonqt.install gepetto-viewer.checkout
344
gepetto-viewer-corba.configure.dep: gepetto-viewer.install \
345
	pythonqt.install gepetto-viewer-corba.checkout
346
hpp-gepetto-viewer.configure.dep: gepetto-viewer-corba.install \
Florent Lamiraux's avatar
Florent Lamiraux committed
347
	hpp-corbaserver.install \
348
	hpp-gepetto-viewer.checkout
349
hpp-gui.configure.dep: hpp-gui.checkout
350
universal_robot.configure.dep: universal_robot.checkout
351
hpp-universal-robot.configure.dep: example-robot-data.install \
Guilhem Saurel's avatar
Guilhem Saurel committed
352
	hpp-universal-robot.checkout
353
example-robot-data.configure.dep: example-robot-data.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
354
hpp-environments.configure.dep: hpp-environments.checkout
355
356
hpp-baxter.configure.dep: hpp-baxter.checkout
hpp_romeo.configure.dep: hpp_romeo.checkout
357
358
359
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
Guilhem Saurel's avatar
Guilhem Saurel committed
360
361
362
anymal-rbprm.configure.dep: anymal-rbprm.checkout
hyq-rbprm.configure.dep: hyq-rbprm.checkout
simple-humanoid-rbprm.configure.dep: simple-humanoid-rbprm.checkout
363
364
talos-rbprm.configure.dep: talos-rbprm.checkout
hpp-rbprm.configure.dep: hpp-core.install hpp-centroidal-dynamics.install \
Guilhem Saurel's avatar
Guilhem Saurel committed
365
366
367
	anymal-rbprm.install hyq-rbprm.install talos-rbprm.install simple-humanoid-rbprm.install \
	hpp-affordance.install curves.install \
	hpp-bezier-com-traj.install hpp-rbprm.checkout
368
369
370
371
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
372
373
hpp-bezier-com-traj.configure.dep: hpp-centroidal-dynamics.install curves.install hpp-bezier-com-traj.checkout
curves.configure.dep: curves.checkout
374
eigenpy.configure.dep: eigenpy.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
375
hpp-tools.configure.dep: hpp-tools.checkout
376

377
378
379
380
# }}}
##################################
# {{{ Targets

381
status:
382
383
384
	@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
385
		${MAKE} "$$child_dir".status; \
386
	done
387

Florent Lamiraux's avatar
Florent Lamiraux committed
388
389
390
391
392
393
394
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

395
396
397
398
399
400
401
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

402
update:
403
404
405
406
407
	@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
408
409
410

%.checkout:
	if [ -d $(@:.checkout=) ]; then \
411
		echo "$(@:.checkout=) already checkout out."; \
Florent Lamiraux's avatar
Florent Lamiraux committed
412
	else \
Florent Lamiraux's avatar
Florent Lamiraux committed
413
		git clone ${GIT_QUIET} --recursive -b ${$(@:.checkout=)_branch} ${$(@:.checkout=)_repository}/$(@:.checkout=); \
Florent Lamiraux's avatar
Florent Lamiraux committed
414
415
	fi \

416
417
418
419
420
421
422
423
%.fetch:
	if [ "${$(@:.fetch=)_repository}" = "" ]; then \
		echo "$(@:.fetch=) is not referenced"; \
	else \
		cd ${SRC_DIR}/$(@:.fetch=);\
		git fetch ${GIT_QUIET} origin; \
	fi

Florent Lamiraux's avatar
Florent Lamiraux committed
424
%.update:
425
426
427
428
429
430
431
	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;\
Florent Lamiraux's avatar
Florent Lamiraux committed
432
433
434
		git checkout -q --detach;\
		git branch -f ${$(@:.update=)_branch} origin/${$(@:.update=)_branch};\
		git checkout -q ${$(@:.update=)_branch};\
435
436
437
		git submodule update; \
	fi

Florent Lamiraux's avatar
Florent Lamiraux committed
438

439
440
%.configure.dep: %.checkout

Florent Lamiraux's avatar
Florent Lamiraux committed
441
442
%.configure: %.configure.dep
	${MAKE} $(@:.configure=).configure_nodep
443

Florent Lamiraux's avatar
Florent Lamiraux committed
444
445
446
%.configure_nodep:%.checkout
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
447
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
Guilhem Saurel's avatar
Guilhem Saurel committed
448
			-DENFORCE_MINIMAL_CXX_STANDARD=ON \
449
450
451
			-DINSTALL_DOCUMENTATION=${INSTALL_DOCUMENTATION} \
			-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -DNDEBUG" \
			${$(@:.configure_nodep=)_extra_flags} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
452

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

Florent Lamiraux's avatar
Florent Lamiraux committed
456
457
%.install_nodep:%.configure_nodep
	${MAKE} -C ${SRC_DIR}/$(@:.install_nodep=)/${BUILD_FOLDER} install
Florent Lamiraux's avatar
Florent Lamiraux committed
458
459

%.uninstall:
460
	${MAKE} -C ${SRC_DIR}/$(@:.uninstall=)/${BUILD_FOLDER} uninstall
Florent Lamiraux's avatar
Florent Lamiraux committed
461
462

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

465
%.very-clean:
466
	rm -rf ${SRC_DIR}/$(@:.very-clean=)/${BUILD_FOLDER}/*
467

Florent Lamiraux's avatar
Florent Lamiraux committed
468
%.status:
Florent Lamiraux's avatar
Florent Lamiraux committed
469
470
471
472
	@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
473

Florent Lamiraux's avatar
Florent Lamiraux committed
474
475
476
477
478
479
480
%.log:
	@cd ${SRC_DIR}/$(@:.log=); \
	if [ -f .git/refs/heads/${$(@:.log=)_branch} ]; then \
		echo -n "$(@:.log=): "; \
		cat .git/refs/heads/${$(@:.log=)_branch}; \
	fi

481
482
483
484
485
486
487
488
489
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

490
robot_model_py.configure: robot_model_py.configure.dep
Florent Lamiraux's avatar
Florent Lamiraux committed
491
	cd ${SRC_DIR}/$(@:.configure=)/xml_reflection;\
492
493
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
494
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
495
	cd ${SRC_DIR}/$(@:.configure=)/urdf_parser_py;\
496
497
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
498
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Marine Heckler's avatar
Marine Heckler committed
499

Florent Lamiraux's avatar
Florent Lamiraux committed
500
robot_model_py.install: robot_model_py.configure
501
502
	${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
503
504
505
506

universal_robot.configure_nodep:
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
507
	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
508
509
510
511
512
513
514
515

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
516

517
518
519
# }}}

# vim: foldmethod=marker foldlevel=0