stable.mk 16.1 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
# Qt version should be either 4 or 5
36
QT_VERSION=5
37
INSTALL_DOCUMENTATION=ON
Florent Lamiraux's avatar
Florent Lamiraux committed
38

Guilhem Saurel's avatar
Guilhem Saurel committed
39
40
41
42
# Either a version tag (e.g. v4.3.0), stable or devel
HPP_VERSION=v4.11.0
HPP_EXTRA_FLAGS= -DBUILD_TESTING=${BUILD_TESTING}$

43
44
45
##################################
# {{{ Dependencies

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

Guilhem Saurel's avatar
Guilhem Saurel committed
50
hpp-template-corba_branch=${HPP_VERSION}
51
hpp-template-corba_repository=${HPP_REPO}
52

53
54
55
# }}}
##################################
# {{{ Packages supporting HPP_VERSION
Guilhem Saurel's avatar
Guilhem Saurel committed
56
hpp-util_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
57
58
hpp-util_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
59
hpp-fcl_branch=v1.7.5
60
hpp-fcl_repository=${HPP_REPO}
61
hpp-fcl_extra_flags= -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_INTERFACE=OFF
62

Guilhem Saurel's avatar
Guilhem Saurel committed
63
hpp-statistics_branch=${HPP_VERSION}
64
hpp-statistics_repository=${HPP_REPO}
65

Guilhem Saurel's avatar
Guilhem Saurel committed
66
hpp-pinocchio_branch=${HPP_VERSION}
67
hpp-pinocchio_repository=${HPP_REPO}
68
hpp-pinocchio_extra_flags=${HPP_EXTRA_FLAGS}
69

Guilhem Saurel's avatar
Guilhem Saurel committed
70
hpp-constraints_branch=${HPP_VERSION}
71
hpp-constraints_repository=${HPP_REPO}
72
hpp-constraints_extra_flags=${HPP_EXTRA_FLAGS} -DUSE_QPOASES=OFF
73

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

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

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

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

Guilhem Saurel's avatar
Guilhem Saurel committed
88
hpp-doc_branch=stable
89
hpp-doc_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
90

Guilhem Saurel's avatar
Guilhem Saurel committed
91
hpp-manipulation_branch=${HPP_VERSION}
92
hpp-manipulation_repository=${HPP_REPO}
93

Guilhem Saurel's avatar
Guilhem Saurel committed
94
hpp-manipulation-urdf_branch=${HPP_VERSION}
95
hpp-manipulation-urdf_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
96

Guilhem Saurel's avatar
Guilhem Saurel committed
97
hpp-manipulation-corba_branch=${HPP_VERSION}
98
hpp-manipulation-corba_repository=${HPP_REPO}
99

100
hpp_tutorial_branch=${HPP_VERSION}
101
hpp_tutorial_repository=${HPP_REPO}
102

Guilhem Saurel's avatar
Guilhem Saurel committed
103
hpp-gepetto-viewer_branch=${HPP_VERSION}
104
hpp-gepetto-viewer_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
105

Guilhem Saurel's avatar
Guilhem Saurel committed
106
hpp-plot_branch=${HPP_VERSION}
107
hpp-plot_repository=${HPP_REPO}
108

Guilhem Saurel's avatar
Guilhem Saurel committed
109
hpp-gui_branch=${HPP_VERSION}
110
hpp-gui_repository=${HPP_REPO}
111

Guilhem Saurel's avatar
Guilhem Saurel committed
112
hpp-practicals_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
113
114
hpp-practicals_repository=${HPP_REPO}

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

Guilhem Saurel's avatar
Guilhem Saurel committed
119
example-robot-data_branch=v3.10.0
120
example-robot-data_repository=${GEPETTO_REPO}
121
example-robot-data_extra_flags= -DBUILD_PYTHON_INTERFACE=OFF
122

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

126
hpp-hrp2_branch=v4.9.0
127
hpp-hrp2_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
128

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

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

135
hpp_benchmark_branch=devel
136
hpp_benchmark_repository=${HPP_REPO}
137

Guilhem Saurel's avatar
Guilhem Saurel committed
138
hpp-environments_branch=${HPP_VERSION}
139
140
hpp-environments_repository=${HPP_REPO}

141
universal_robot_branch=kinetic
Florent Lamiraux's avatar
Florent Lamiraux committed
142
143
universal_robot_repository=${HPP_REPO}

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

Guilhem Saurel's avatar
Guilhem Saurel committed
147
hpp-baxter_branch=v4.11.1
148
149
hpp-baxter_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
150
hpp_romeo_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
151
hpp_romeo_repository=${HPP_REPO}
152

153
154
155
156
157

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

Guilhem Saurel's avatar
Guilhem Saurel committed
158
hpp-affordance_branch=${HPP_VERSION}
159
160
161
hpp-affordance_repository=${HPP_REPO}
hpp-affordance_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
162
hpp-affordance-corba_branch=${HPP_VERSION}
163
164
165
hpp-affordance-corba_repository=${HPP_REPO}
hpp-affordance-corba_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
166
anymal-rbprm_branch=${HPP_VERSION}
Guilhem Saurel's avatar
Guilhem Saurel committed
167
168
anymal-rbprm_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
169
hyq-rbprm_branch=${HPP_VERSION}
Guilhem Saurel's avatar
Guilhem Saurel committed
170
171
hyq-rbprm_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
172
simple-humanoid-rbprm_branch=${HPP_VERSION}
Guilhem Saurel's avatar
Guilhem Saurel committed
173
174
simple-humanoid-rbprm_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
175
176
177
178
solo-rbprm_branch=${HPP_VERSION}
solo-rbprm_repository=${HPP_REPO}

talos-rbprm_branch=${HPP_VERSION}
179
180
talos-rbprm_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
181
hpp-rbprm_branch=${HPP_VERSION}
182
183
184
hpp-rbprm_repository=${HPP_REPO}
hpp-rbprm_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
185
hpp-rbprm-corba_branch=${HPP_VERSION}
186
187
188
hpp-rbprm-corba_repository=${HPP_REPO}
hpp-rbprm-corba_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
189
hpp-centroidal-dynamics_branch=${HPP_VERSION}
190
191
hpp-centroidal-dynamics_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
192
hpp-bezier-com-traj_branch=${HPP_VERSION}
193
194
195
hpp-bezier-com-traj_repository=${HPP_REPO}
hpp-bezier-com-traj_extra_flags= -DBUILD_PYTHON_INTERFACE=ON

Guilhem Saurel's avatar
Guilhem Saurel committed
196
ndcurves_branch=v1.1.0
197
198
ndcurves_repository=${LOCO3D_REPO}
ndcurves_extra_flags= -DBUILD_PYTHON_INTERFACE=ON
199

Guilhem Saurel's avatar
Guilhem Saurel committed
200
eigenpy_branch=v2.6.7
201
202
eigenpy_repository=${SOT_REPO}

203
204
205
206
207
208
209
210
211
212
# }}}
##################################
# {{{ 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
213
osg-dae_extra_flags= -DCOLLADA_DYNAMIC_LIBRARY=${INSTALL_HPP_DIR}/lib/libcollada14dom.so -DCOLLADA_INCLUDE_DIR=${INSTALL_HPP_DIR}/include/collada-dom
214
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=""
215

Guilhem Saurel's avatar
Guilhem Saurel committed
216
gepetto-viewer_branch=v4.12.0
217
gepetto-viewer_repository=${GEPETTO_REPO}
218
ifeq (${QT_VERSION}, 5)
219
	gepetto-viewer_extra_flags= -DPROJECT_USE_QT4=OFF
220
else
221
	gepetto-viewer_extra_flags= -DPROJECT_USE_QT4=ON
222
endif
Florent Lamiraux's avatar
Florent Lamiraux committed
223

Guilhem Saurel's avatar
Guilhem Saurel committed
224
gepetto-viewer-corba_branch=v5.6.0
Guilhem Saurel's avatar
Guilhem Saurel committed
225
226
gepetto-viewer-corba_repository=${GEPETTO_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
227
qgv_branch=v1.3.1
228
qgv_repository=${HPP_REPO}
Joseph Mirabel's avatar
Joseph Mirabel committed
229
230
231
232
233
ifeq (${QT_VERSION}, 5)
	qgv_extra_flags=-DBINDINGS_QT5=ON -DBINDINGS_QT4=OFF
else
	qgv_extra_flags=-DBINDINGS_QT5=OFF -DBINDINGS_QT4=ON
endif
234

235
hpp-tools_branch=v4.9.0
236
hpp-tools_repository=${HPP_REPO}
237
hpp-tools_extra_flags=
238

239
240
241
242
# }}}
##################################
# {{{ High-level targets

243
all: hpp_tutorial.install hpp-gepetto-viewer.install hpp-plot.install hpp-gui.install
244
	${MAKE} hpp-doc.install
Florent Lamiraux's avatar
Florent Lamiraux committed
245

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

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

262
263
264
265
rbprm: hpp-rbprm-corba.install hpp-gepetto-viewer.install
	${MAKE} hpp-doc.install


266
267
268
269
# }}}
##################################
# {{{ Dependencies declaration

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

350
351
352
353
# }}}
##################################
# {{{ Targets

354
status:
355
356
357
	@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
358
		${MAKE} "$$child_dir".status; \
359
	done
360

Florent Lamiraux's avatar
Florent Lamiraux committed
361
362
363
364
365
366
367
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

368
369
370
371
372
373
374
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

375
update:
376
377
378
379
380
	@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
381
382
383

%.checkout:
	if [ -d $(@:.checkout=) ]; then \
384
		echo "$(@:.checkout=) already checkout out."; \
Florent Lamiraux's avatar
Florent Lamiraux committed
385
	else \
Florent Lamiraux's avatar
Florent Lamiraux committed
386
		git clone ${GIT_QUIET} --recursive -b ${$(@:.checkout=)_branch} ${$(@:.checkout=)_repository}/$(@:.checkout=); \
Florent Lamiraux's avatar
Florent Lamiraux committed
387
388
	fi \

389
390
391
392
393
394
%.fetch:
	if [ "${$(@:.fetch=)_repository}" = "" ]; then \
		echo "$(@:.fetch=) is not referenced"; \
	else \
		cd ${SRC_DIR}/$(@:.fetch=);\
		git fetch ${GIT_QUIET} origin; \
395
		git fetch ${GIT_QUIET} origin --tags; \
396
397
	fi

Florent Lamiraux's avatar
Florent Lamiraux committed
398
%.update:
399
400
401
402
403
404
405
	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;\
406
		git fetch origin --tags;\
Florent Lamiraux's avatar
Florent Lamiraux committed
407
408
409
		git checkout -q --detach;\
		git branch -f ${$(@:.update=)_branch} origin/${$(@:.update=)_branch};\
		git checkout -q ${$(@:.update=)_branch};\
410
411
412
		git submodule update; \
	fi

Florent Lamiraux's avatar
Florent Lamiraux committed
413

414
415
%.configure.dep: %.checkout

Florent Lamiraux's avatar
Florent Lamiraux committed
416
417
%.configure: %.configure.dep
	${MAKE} $(@:.configure=).configure_nodep
418

Florent Lamiraux's avatar
Florent Lamiraux committed
419
420
421
%.configure_nodep:%.checkout
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
422
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
Guilhem Saurel's avatar
Guilhem Saurel committed
423
			-DENFORCE_MINIMAL_CXX_STANDARD=ON \
424
425
426
			-DINSTALL_DOCUMENTATION=${INSTALL_DOCUMENTATION} \
			-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -DNDEBUG" \
			${$(@:.configure_nodep=)_extra_flags} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
427

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

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

%.uninstall:
435
	${MAKE} -C ${SRC_DIR}/$(@:.uninstall=)/${BUILD_FOLDER} uninstall
Florent Lamiraux's avatar
Florent Lamiraux committed
436
437

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

440
%.very-clean:
441
	rm -rf ${SRC_DIR}/$(@:.very-clean=)/${BUILD_FOLDER}/*
442

Florent Lamiraux's avatar
Florent Lamiraux committed
443
%.status:
Florent Lamiraux's avatar
Florent Lamiraux committed
444
445
446
447
	@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
448

Florent Lamiraux's avatar
Florent Lamiraux committed
449
450
451
452
453
454
455
%.log:
	@cd ${SRC_DIR}/$(@:.log=); \
	if [ -f .git/refs/heads/${$(@:.log=)_branch} ]; then \
		echo -n "$(@:.log=): "; \
		cat .git/refs/heads/${$(@:.log=)_branch}; \
	fi

456
457
458
459
460
461
462
463
464
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

465
robot_model_py.configure: robot_model_py.configure.dep
Florent Lamiraux's avatar
Florent Lamiraux committed
466
	cd ${SRC_DIR}/$(@:.configure=)/xml_reflection;\
467
468
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
469
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
470
	cd ${SRC_DIR}/$(@:.configure=)/urdf_parser_py;\
471
472
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
473
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Marine Heckler's avatar
Marine Heckler committed
474

Florent Lamiraux's avatar
Florent Lamiraux committed
475
robot_model_py.install: robot_model_py.configure
476
477
	${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
478
479
480
481

universal_robot.configure_nodep:
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
482
	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
483
484
485
486
487
488
489
490

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
491

492
493
494
# }}}

# vim: foldmethod=marker foldlevel=0