Makefile 17.2 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
Florent Lamiraux's avatar
Florent Lamiraux committed
12

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

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

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

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

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

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

Joseph Mirabel's avatar
Joseph Mirabel committed
46
pinocchio_branch=v2.4.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

50
hpp-template-corba_branch=devel
51
hpp-template-corba_repository=${HPP_REPO}
52

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

57
# Either a version tag (e.g. v4.3.0), master or devel
58
HPP_VERSION=devel
59
60
HPP_EXTRA_FLAGS=-DDISABLE_TESTS=${DISABLE_TESTS} \
	-DBUILD_TESTING=${BUILD_TESTING}$
61
62

hpp-util_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
63
64
hpp-util_repository=${HPP_REPO}

65
hpp-fcl_branch=${HPP_VERSION}
66
hpp-fcl_repository=${HPP_REPO}
67
hpp-fcl_extra_flags= -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_INTERFACE=OFF
68
69
70

hpp-statistics_branch=${HPP_VERSION}
hpp-statistics_repository=${HPP_REPO}
71

72
hpp-pinocchio_branch=${HPP_VERSION}
73
hpp-pinocchio_repository=${HPP_REPO}
74
hpp-pinocchio_extra_flags=${HPP_EXTRA_FLAGS}
75

76
hpp-constraints_branch=${HPP_VERSION}
77
hpp-constraints_repository=${HPP_REPO}
78
hpp-constraints_extra_flags=${HPP_EXTRA_FLAGS} -DUSE_QPOASES=OFF -DRUN_TESTS=OFF
79

80
hpp-core_branch=${HPP_VERSION}
81
hpp-core_repository=${HPP_REPO}
82
hpp-core_extra_flags=${HPP_EXTRA_FLAGS}
Florent Lamiraux's avatar
Florent Lamiraux committed
83

84
hpp-corbaserver_branch=${HPP_VERSION}
85
hpp-corbaserver_repository=${HPP_REPO}
86
hpp-corbaserver_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
Florent Lamiraux's avatar
Florent Lamiraux committed
87

88
hpp-walkgen_branch=${HPP_VERSION}
Joseph Mirabel's avatar
Joseph Mirabel committed
89
90
hpp-walkgen_repository=${HPP_REPO}

91
hpp-wholebody-step_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
92
hpp-wholebody-step_repository=${HPP_REPO}
93
hpp-wholebody-step_extra_flags= -DRUN_TESTS=OFF
Florent Lamiraux's avatar
Florent Lamiraux committed
94

Joseph Mirabel's avatar
Joseph Mirabel committed
95
hpp-doc_branch=${HPP_VERSION}
96
hpp-doc_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
97

98
hpp-manipulation_branch=${HPP_VERSION}
99
hpp-manipulation_repository=${HPP_REPO}
100

101
hpp-manipulation-urdf_branch=${HPP_VERSION}
102
hpp-manipulation-urdf_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
103

104
hpp-manipulation-corba_branch=${HPP_VERSION}
105
hpp-manipulation-corba_repository=${HPP_REPO}
106
hpp-manipulation-corba_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
107

108
109
110
111
112
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
113

114
hpp_tutorial_branch=${HPP_VERSION}
115
hpp_tutorial_repository=${HPP_REPO}
116
hpp_tutorial_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
117

118
119
hpp-gepetto-viewer_branch=${HPP_VERSION}
hpp-gepetto-viewer_repository=${HPP_REPO}
120
hpp-gepetto-viewer_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
Florent Lamiraux's avatar
Florent Lamiraux committed
121

122
123
hpp-plot_branch=${HPP_VERSION}
hpp-plot_repository=${HPP_REPO}
124

125
126
hpp-gui_branch=${HPP_VERSION}
hpp-gui_repository=${HPP_REPO}
127
hpp-gui_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
128

129
130
131
# }}}
##################################
# {{{ Robot specific package + test packages
132

133
134
example-robot-data_branch=devel
example-robot-data_repository=${GEPETTO_REPO}
135
example-robot-data_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_PYTHON_INTERFACE=OFF
136

137
hrp2-14-description_branch=master
138
hrp2-14-description_repository=${TRAC_REPO}
139

140
hpp-hrp2_branch=devel
141
hpp-hrp2_repository=${HPP_REPO}
142
hpp-hrp2_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
Florent Lamiraux's avatar
Florent Lamiraux committed
143

144
145
robot_capsule_urdf_branch=groovy
robot_capsule_urdf_repository=${LAAS_REPO}
146

147
148
robot_model_py_branch=groovy
robot_model_py_repository=${LAAS_REPO}
149

150
iai_maps_branch=devel
151
152
153
154
iai_maps_repository=${HPP_REPO}

hpp_benchmark_branch=master
hpp_benchmark_repository=${HPP_REPO}
155

Guilhem Saurel's avatar
Guilhem Saurel committed
156
hpp-environments_branch=${HPP_VERSION}
157
hpp-environments_repository=${HPP_REPO}
158
hpp-environments_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
159

160
universal_robot_branch=kinetic
Florent Lamiraux's avatar
Florent Lamiraux committed
161
162
universal_robot_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
163
164
hpp-universal-robot_branch=${HPP_VERSION}
hpp-universal-robot_repository=${HPP_REPO}
165
hpp-universal-robot_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
Florent Lamiraux's avatar
Florent Lamiraux committed
166

Guilhem Saurel's avatar
Guilhem Saurel committed
167
hpp-baxter_branch=${HPP_VERSION}
168
hpp-baxter_repository=${HPP_REPO}
169
hpp-baxter_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
170

Guilhem Saurel's avatar
Guilhem Saurel committed
171
hpp_romeo_branch=${HPP_VERSION}
Florent Lamiraux's avatar
Florent Lamiraux committed
172
hpp_romeo_repository=${HPP_REPO}
173
hpp_romeo_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
174
175
176
177
178
179
180
181
182
183
184
185
186

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

hpp-affordance_branch=${HPP_VERSION}
hpp-affordance_repository=${HPP_REPO}
hpp-affordance_extra_flags=${HPP_EXTRA_FLAGS}

hpp-affordance-corba_branch=${HPP_VERSION}
hpp-affordance-corba_repository=${HPP_REPO}
hpp-affordance-corba_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
187
hpp-rbprm_branch=${HPP_VERSION}
188
189
190
hpp-rbprm_repository=${HPP_REPO}
hpp-rbprm_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
191
hpp-rbprm-robot-data_branch=${HPP_VERSION}
192
193
hpp-rbprm-robot-data_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
194
hpp-rbprm-corba_branch=${HPP_VERSION}
195
196
197
hpp-rbprm-corba_repository=${HPP_REPO}
hpp-rbprm-corba_extra_flags=${HPP_EXTRA_FLAGS}

Guilhem Saurel's avatar
Guilhem Saurel committed
198
hpp-centroidal-dynamics_branch=${HPP_VERSION}
199
200
hpp-centroidal-dynamics_repository=${HPP_REPO}

Guilhem Saurel's avatar
Guilhem Saurel committed
201
hpp-bezier-com-traj_branch=${HPP_VERSION}
202
203
204
hpp-bezier-com-traj_repository=${HPP_REPO}
hpp-bezier-com-traj_extra_flags= -DBUILD_PYTHON_INTERFACE=ON

Guilhem Saurel's avatar
Guilhem Saurel committed
205
hpp-spline_branch=${HPP_VERSION}
206
207
208
hpp-spline_repository=${HPP_REPO}
hpp-spline_extra_flags= -DBUILD_PYTHON_INTERFACE=ON

Guilhem Saurel's avatar
Guilhem Saurel committed
209
eigenpy_branch=v1.5.1
210
211
eigenpy_repository=${SOT_REPO}

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

Guilhem Saurel's avatar
Guilhem Saurel committed
225
gepetto-viewer_branch=${HPP_VERSION}
226
gepetto-viewer_repository=${GEPETTO_REPO}
227
228
229
230
231
ifeq (${QT_VERSION}, 5)
	gepetto-viewer_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPROJECT_USE_QT4=OFF
else
	gepetto-viewer_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPROJECT_USE_QT4=ON
endif
Florent Lamiraux's avatar
Florent Lamiraux committed
232

Guilhem Saurel's avatar
Guilhem Saurel committed
233
234
gepetto-viewer-corba_branch=${HPP_VERSION}
gepetto-viewer-corba_repository=${GEPETTO_REPO}
235
gepetto-viewer-corba_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
Guilhem Saurel's avatar
Guilhem Saurel committed
236

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

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

249
250
hpp-tools_branch=${HPP_VERSION}
hpp-tools_repository=${HPP_REPO}
251
hpp-tools_extra_flags= -DPYTHON_EXECUTABLE=/usr/bin/python3
252

253
254
255
256
# }}}
##################################
# {{{ High-level targets

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

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

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

275
276
277
278
rbprm: hpp-rbprm-corba.install hpp-gepetto-viewer.install
	${MAKE} hpp-doc.install


279
280
281
282
# }}}
##################################
# {{{ Dependencies declaration

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

368
369
370
371
# }}}
##################################
# {{{ Targets

372
status:
373
374
375
	@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
376
		${MAKE} "$$child_dir".status; \
377
	done
378

Florent Lamiraux's avatar
Florent Lamiraux committed
379
380
381
382
383
384
385
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

386
387
388
389
390
391
392
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

393
update:
394
395
396
397
398
	@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
399
400
401

%.checkout:
	if [ -d $(@:.checkout=) ]; then \
402
		echo "$(@:.checkout=) already checkout out."; \
Florent Lamiraux's avatar
Florent Lamiraux committed
403
	else \
Florent Lamiraux's avatar
Florent Lamiraux committed
404
		git clone ${GIT_QUIET} --recursive -b ${$(@:.checkout=)_branch} ${$(@:.checkout=)_repository}/$(@:.checkout=); \
Florent Lamiraux's avatar
Florent Lamiraux committed
405
406
	fi \

407
408
409
410
411
412
413
414
%.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
415
%.update:
416
417
418
419
420
421
422
	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
423
424
425
		git checkout -q --detach;\
		git branch -f ${$(@:.update=)_branch} origin/${$(@:.update=)_branch};\
		git checkout -q ${$(@:.update=)_branch};\
426
427
428
		git submodule update; \
	fi

Florent Lamiraux's avatar
Florent Lamiraux committed
429

430
431
%.configure.dep: %.checkout

Florent Lamiraux's avatar
Florent Lamiraux committed
432
433
%.configure: %.configure.dep
	${MAKE} $(@:.configure=).configure_nodep
434

Florent Lamiraux's avatar
Florent Lamiraux committed
435
436
437
%.configure_nodep:%.checkout
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/${BUILD_FOLDER}; \
438
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
439
440
441
			-DINSTALL_DOCUMENTATION=${INSTALL_DOCUMENTATION} \
			-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -DNDEBUG" \
			${$(@:.configure_nodep=)_extra_flags} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
442

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

Florent Lamiraux's avatar
Florent Lamiraux committed
446
447
%.install_nodep:%.configure_nodep
	${MAKE} -C ${SRC_DIR}/$(@:.install_nodep=)/${BUILD_FOLDER} install
Florent Lamiraux's avatar
Florent Lamiraux committed
448
449

%.uninstall:
450
	${MAKE} -C ${SRC_DIR}/$(@:.uninstall=)/${BUILD_FOLDER} uninstall
Florent Lamiraux's avatar
Florent Lamiraux committed
451
452

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

455
%.very-clean:
456
	rm -rf ${SRC_DIR}/$(@:.very-clean=)/${BUILD_FOLDER}/*
457

Florent Lamiraux's avatar
Florent Lamiraux committed
458
%.status:
Florent Lamiraux's avatar
Florent Lamiraux committed
459
460
461
462
	@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
463

Florent Lamiraux's avatar
Florent Lamiraux committed
464
465
466
467
468
469
470
%.log:
	@cd ${SRC_DIR}/$(@:.log=); \
	if [ -f .git/refs/heads/${$(@:.log=)_branch} ]; then \
		echo -n "$(@:.log=): "; \
		cat .git/refs/heads/${$(@:.log=)_branch}; \
	fi

471
472
473
474
475
476
477
478
479
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

480
robot_model_py.configure: robot_model_py.configure.dep
Florent Lamiraux's avatar
Florent Lamiraux committed
481
	cd ${SRC_DIR}/$(@:.configure=)/xml_reflection;\
482
483
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
484
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
485
	cd ${SRC_DIR}/$(@:.configure=)/urdf_parser_py;\
486
487
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
488
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_HPP_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Marine Heckler's avatar
Marine Heckler committed
489

Florent Lamiraux's avatar
Florent Lamiraux committed
490
robot_model_py.install: robot_model_py.configure
491
492
	${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
493
494
495
496

universal_robot.configure_nodep:
	mkdir -p ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure_nodep=)/ur_description/${BUILD_FOLDER}; \
497
	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
498
499
500
501
502
503
504
505

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
506

507
508
509
# }}}

# vim: foldmethod=marker foldlevel=0