Makefile 11.4 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
JRL_REPO=https://github.com/jrl-umi3218
Florent Lamiraux's avatar
Florent Lamiraux committed
8
9
LAAS_REPO=https://github.com/laas
HPP_REPO=https://github.com/humanoid-path-planner
10
SOT_REPO=https://github.com/stack-of-tasks
Florent Lamiraux's avatar
Florent Lamiraux committed
11
12

SRC_DIR=${DEVEL_DIR}/src
13
14
INSTALL_DIR=${DEVEL_DIR}/install

15
BUILD_TYPE=Release
16
17
18
19
20
ifeq (${BUILD_TYPE},Debug)
  BUILD_FOLDER=build
else
  BUILD_FOLDER=build-rel
endif
Florent Lamiraux's avatar
Florent Lamiraux committed
21

Joseph Mirabel's avatar
Joseph Mirabel committed
22
hpp-fcl_branch=master
23
hpp-fcl_repository=${HPP_REPO}
24
hpp-fcl_extra_flags= -DCMAKE_BUILD_TYPE=Release
Florent Lamiraux's avatar
Florent Lamiraux committed
25

26
hpp-util_branch=master
Florent Lamiraux's avatar
Florent Lamiraux committed
27
28
hpp-util_repository=${HPP_REPO}

29
hpp-model_branch=master
Florent Lamiraux's avatar
Florent Lamiraux committed
30
31
hpp-model_repository=${HPP_REPO}

32
33
34
35
36
37
38
39
pinocchio_branch=master
pinocchio_repository=${SOT_REPO}
pinocchio_extra_flags= -DBUILD_PYTHON_INTERFACE=OFF

hpp-pinocchio_branch=master
hpp-pinocchio_repository=${HPP_REPO}

hpp-model-urdf_branch=xxx
Florent Lamiraux's avatar
Florent Lamiraux committed
40
41
hpp-model-urdf_repository=${HPP_REPO}

42
hpp-statistics_branch=master
43
hpp-statistics_repository=${HPP_REPO}
44

45
hpp-core_branch=master
46
hpp-core_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
47

48
hpp-template-corba_branch=master
Florent Lamiraux's avatar
Florent Lamiraux committed
49
50
hpp-template-corba_repository=${LAAS_REPO}

51
hpp-corbaserver_branch=master
52
hpp-corbaserver_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
53

54
55
56
qpOASES_branch=master
qpOASES_repository=${HPP_REPO}

57
hpp-constraints_branch=master
58
hpp-constraints_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
59

60
hpp-walkgen_branch=master
Joseph Mirabel's avatar
Joseph Mirabel committed
61
62
hpp-walkgen_repository=${HPP_REPO}

63
hpp-wholebody-step_branch=master
Florent Lamiraux's avatar
Florent Lamiraux committed
64
65
hpp-wholebody-step_repository=${HPP_REPO}

66
hpp-wholebody-step-corba_branch=master
Florent Lamiraux's avatar
Florent Lamiraux committed
67
68
hpp-wholebody-step-corba_repository=${HPP_REPO}

69
test-hpp_branch=master
70
test-hpp_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
71
72

hrp2_branch=groovy
Marine Heckler's avatar
Marine Heckler committed
73
hrp2_repository=${JRL_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
74

75
hpp-hrp2_branch=master
76
hpp-hrp2_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
77

Florent Lamiraux's avatar
Florent Lamiraux committed
78
79
80
81
82
83
robot_capsule_urdf_branch=groovy
robot_capsule_urdf_repository=${LAAS_REPO}

robot_model_py_branch=groovy
robot_model_py_repository=${LAAS_REPO}

84
hpp-doc_branch=master
85
hpp-doc_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
86

87
hpp-manipulation_branch=master
88
hpp-manipulation_repository=${HPP_REPO}
89

90
91

hpp-manipulation-urdf_branch=master
92
hpp-manipulation-urdf_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
93

94
hpp-manipulation-corba_branch=master
95
hpp-manipulation-corba_repository=${HPP_REPO}
96

97
98
99
100
101
102
robot_state_chain_publisher_branch=master
robot_state_chain_publisher_repository=${HPP_REPO}

iai_maps_branch=master
iai_maps_repository=${HPP_REPO}

103
hpp_tutorial_branch=master
104
hpp_tutorial_repository=${HPP_REPO}
105
106
107

hpp_benchmark_branch=master
hpp_benchmark_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
108

109
110
111
collada-dom_branch=master
collada-dom_repository=${HPP_REPO}

112
113
114
OpenSceneGraph-dae-plugin_branch=master
OpenSceneGraph-dae-plugin_repository=${HPP_REPO}

115
gepetto-viewer_branch=master
116
117
gepetto-viewer_repository=${HPP_REPO}

118
gepetto-viewer-corba_branch=master
119
120
gepetto-viewer-corba_repository=${HPP_REPO}

121
hpp-gepetto-viewer_branch=master
122
hpp-gepetto-viewer_repository=${HPP_REPO}
123

124
125
126
127
128
129
130
131
132
qgv_branch=master
qgv_repository=${HPP_REPO}

hpp-environments_branch=master
hpp-environments_repository=${HPP_REPO}

hpp-baxter_branch=master
hpp-baxter_repository=${HPP_REPO}

133
OpenSceneGraph-dae-plugin_extra_flags= -DCOLLADA_DYNAMIC_LIBRARY=${INSTALL_DIR}/lib/libcollada14dom.so -DCOLLADA_INCLUDE_DIR=${INSTALL_DIR}/include/collada-dom
134

Joseph Mirabel's avatar
Joseph Mirabel committed
135
136
doxygen-Release_1_8_10_extra_flags= -DCMAKE_BUILD_TYPE=Release

137
138
139
140
141
142
roboptim-core-3.1_extra_flags= -DCMAKE_BUILD_TYPE=Release

roboptim-trajectory-3.1_extra_flags= -DCMAKE_BUILD_TYPE=Release

qpOASES_extra_flags= -DCMAKE_BUILD_TYPE=Release

Joseph Mirabel's avatar
Joseph Mirabel committed
143
all: doxygen-Release_1_8_10.install hpp_tutorial.install \
144
	hpp-manipulation-corba.install 	hpp-gepetto-viewer.install
145
	${MAKE} hpp-doc.install
Florent Lamiraux's avatar
Florent Lamiraux committed
146

Marine Heckler's avatar
Marine Heckler committed
147
# source $DEVEL_DIR/install/setup.bash before installing hrp2.
148
149
hrp2: test-hpp.install

Joseph Mirabel's avatar
Joseph Mirabel committed
150
hpp-fcl.configure.dep: eigen3.install hpp-fcl.checkout
151
eigen3.configure.dep: eigen3.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
152
doxygen-Release_1_8_10.configure.dep: doxygen-Release_1_8_10.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
153
154
roboptim-core-3.1.configure.dep: eigen3.install roboptim-core-3.1.checkout
roboptim-trajectory-3.1.configure.dep: roboptim-core-3.1.install \
155
	roboptim-trajectory-3.1.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
156
157
hpp-walkgen.configure.dep: hpp-util.install hpp-core.install \
        roboptim-trajectory-3.1.install hpp-walkgen.checkout
158
hpp-util.configure.dep: hpp-util.checkout
159
hpp-model.configure.dep: hpp-util.install hpp-fcl.install \
160
161
	eigen3.install hpp-model.checkout
hpp-model-urdf.configure.dep: hpp-model.install hpp-model-urdf.checkout
162
163
164
pinocchio.configure.dep: eigen3.install hpp-fcl.install pinocchio.checkout
hpp-pinocchio.configure.dep: pinocchio.install hpp-util.install \
	hpp-pinocchio.checkout
165
166
167
hpp-statistics.configure.dep: hpp-statistics.checkout
hpp-core.configure.dep: hpp-constraints.install hpp-statistics.install \
	hpp-core.checkout
168
qpOASES.configure.dep: qpOASES.checkout
169
170
hpp-constraints.configure.dep: qpOASES.install \
	hpp-pinocchio.install hpp-constraints.checkout
Joseph Mirabel's avatar
Joseph Mirabel committed
171
hpp-wholebody-step.configure.dep: hpp-constraints.install hpp-walkgen.install \
172
173
	hpp-wholebody-step.checkout
hpp-manipulation.configure.dep: hpp-core.install hpp-constraints.install \
Joseph Mirabel's avatar
Joseph Mirabel committed
174
	hpp-wholebody-step.install hpp-manipulation.checkout
175
hpp-manipulation-urdf.configure.dep:hpp-manipulation.install \
176
177
	hpp-manipulation-urdf.checkout
hpp-corbaserver.configure.dep: hpp-core.install \
178
179
180
181
182
	hpp-constraints.install hpp-corbaserver.checkout
hpp-wholebody-step-corba.configure.dep: hpp-corbaserver.install \
	hpp-wholebody-step.install hpp-template-corba.install \
	hpp-wholebody-step-corba.checkout
hpp-template-corba.configure.dep: hpp-util.install hpp-template-corba.checkout
183
hpp-manipulation-corba.configure.dep: hpp-manipulation-urdf.install \
184
185
186
187
188
189
190
191
192
	hpp-wholebody-step-corba.install hpp-manipulation.install \
	hpp-manipulation-corba.checkout
robot_model_py.configure.dep: robot_model_py.checkout
robot_capsule_urdf.configure.dep: robot_model_py.install \
	robot_capsule_urdf.checkout
hpp-hrp2.configure.dep: hrp2.install hpp-corbaserver.install hpp-hrp2.checkout
hrp2.configure.dep: robot_capsule_urdf.install robot_model_py.install \
	hrp2.checkout
test-hpp.configure.dep: hpp-wholebody-step-corba.install \
193
	hpp-gepetto-viewer.install hpp-hrp2.install test-hpp.checkout
194
195
robot_state_chain_publisher.configure.dep: robot_state_chain_publisher.checkout
iai_maps.configure.dep: robot_state_chain_publisher.install iai_maps.checkout
196
197
hpp_tutorial.configure.dep: hpp-gepetto-viewer.install iai_maps.install \
	hpp-corbaserver.install hpp_tutorial.checkout
198
hpp_benchmark.configure.dep: hpp_benchmark.checkout
199
collada-dom.configure.dep: collada-dom.checkout
200
201
202
OpenSceneGraph-dae-plugin.configure.dep: collada-dom.install \
	OpenSceneGraph-dae-plugin.checkout
gepetto-viewer.configure.dep: OpenSceneGraph-dae-plugin.install \
203
204
205
206
	gepetto-viewer.checkout
gepetto-viewer-corba.configure.dep: gepetto-viewer.install \
	gepetto-viewer-corba.checkout
hpp-gepetto-viewer.configure.dep: gepetto-viewer-corba.install \
Florent Lamiraux's avatar
Florent Lamiraux committed
207
	hpp-corbaserver.install \
208
	hpp-gepetto-viewer.checkout
209
210
qgv.configure.dep: qgv.checkout
hpp-baxter.configure.dep: hpp-corbaserver.install hpp-baxter.checkout
211
212

status:
213
214
215
216
217
218
	@for child_dir in $$(ls ${SRC_DIR}); do \
		test -d "$$child_dir" || continue; \
		test -d "$$child_dir/.git" || continue; \
		cd "$$child_dir";\
		echo \
		"\033[1;36m------- Folder $$child_dir ---------------\033[0m"; \
219
		git --no-pager -c status.showUntrackedFiles=no status --short --branch; \
220
221
		cd ..; \
	done
222

Florent Lamiraux's avatar
Florent Lamiraux committed
223
224
225
226
227
228
229
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

230
update:
231
	for d in hpp-util hpp-pinocchio hpp-core hpp-template-corba hpp-corbaserver hpp-constraints hpp-wholebody-step hpp-wholebody-step-corba hpp-doc ; do \
232
	echo "Updating $$d";\
233
	${MAKE} $$d.update; done
Florent Lamiraux's avatar
Florent Lamiraux committed
234
235
236

%.checkout:
	if [ -d $(@:.checkout=) ]; then \
237
		echo "$(@:.checkout=) already checkout out."; \
Florent Lamiraux's avatar
Florent Lamiraux committed
238
239
240
241
242
243
	else \
		git clone --recursive -b ${$(@:.checkout=)_branch} ${$(@:.checkout=)_repository}/$(@:.checkout=); \
	fi \

%.update:
	cd ${SRC_DIR}/$(@:.update=);\
244
245
	git remote rm origin;\
	git remote add origin ${$(@:.update=)_repository}/$(@:.update=);\
Florent Lamiraux's avatar
Florent Lamiraux committed
246
247
248
249
250
251
252
	git fetch origin;\
	git checkout -b bce46g origin/${$(@:.update=)_branch};\
	git branch -D ${$(@:.update=)_branch};\
	git checkout -b ${$(@:.update=)_branch} bce46g;\
	git branch -D bce46g;\
	git submodule update

253
254
255
256
257
258
259
%.configure:%.configure.dep %.confthis
	: # Do nothing else

%.confthis:%.checkout
	mkdir -p ${SRC_DIR}/$(@:.confthis=)/${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.confthis=)/${BUILD_FOLDER}; \
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -DNDEBUG" ${$(@:.confthis=)_extra_flags} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
260

Florent Lamiraux's avatar
Florent Lamiraux committed
261
%.install:%.configure
262
263
264
265
	${MAKE} -C ${SRC_DIR}/$(@:.install=)/${BUILD_FOLDER} install

%.instthis:%.confthis
	${MAKE} -C ${SRC_DIR}/$(@:.instthis=)/${BUILD_FOLDER} install
Florent Lamiraux's avatar
Florent Lamiraux committed
266
267

%.uninstall:
268
	${MAKE} -C ${SRC_DIR}/$(@:.uninstall=)/${BUILD_FOLDER} uninstall
Florent Lamiraux's avatar
Florent Lamiraux committed
269
270

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

273
%.very-clean:
274
	rm -rf ${SRC_DIR}/$(@:.very-clean=)/${BUILD_FOLDER}/*
275

Florent Lamiraux's avatar
Florent Lamiraux committed
276
277
278
%.status:
	cd ${SRC_DIR}/$(@:.status=); git status

Florent Lamiraux's avatar
Florent Lamiraux committed
279
280
281
282
283
284
285
286
%.log:
	@cd ${SRC_DIR}/$(@:.log=); \
	if [ -f .git/refs/heads/${$(@:.log=)_branch} ]; then \
		echo -n "$(@:.log=): "; \
		cat .git/refs/heads/${$(@:.log=)_branch}; \
	fi


Florent Lamiraux's avatar
Florent Lamiraux committed
287
hpp-doc.configure: hpp-doc.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
288
289
	cd ${SRC_DIR}/$(@:.configure=);\
	./bootstrap;\
290
291
	mkdir -p ${BUILD_FOLDER}; \
	cd ${SRC_DIR}/$(@:.configure=)/${BUILD_FOLDER}; \
292
	../configure --prefix=${INSTALL_DIR}
Florent Lamiraux's avatar
Florent Lamiraux committed
293
294

eigen3.checkout:
295
296
297
	if [ -d $(@:.checkout=) ]; then \
		echo "$(@:.checkout=) already checkout out."; \
	else \
298
299
		wget -O - "http://bitbucket.org/eigen/eigen/get/3.2.4.tar.bz2" | tar -xj; \
		mv eigen-eigen-10219c95fe65 eigen3;\
300
	fi
Florent Lamiraux's avatar
Florent Lamiraux committed
301

302
eigen3.configure: eigen3.configure.dep
Florent Lamiraux's avatar
Florent Lamiraux committed
303
	cd ${SRC_DIR}/eigen3;\
304
305
	mkdir -p ${BUILD_FOLDER}; \
	cd ${SRC_DIR}/eigen3/${BUILD_FOLDER}; \
306
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR=lib -Dpkg_config_libdir=${INSTALL_DIR}/lib ..
Florent Lamiraux's avatar
Florent Lamiraux committed
307

Joseph Mirabel's avatar
Joseph Mirabel committed
308
309
310
311
roboptim-core-3.1.checkout:
	if [ -d $(@:.checkout=) ]; then \
		echo "$(@:.checkout=) already checkout out."; \
	else \
312
		wget -O - "https://github.com/roboptim/roboptim-core/releases/download/v3.1/roboptim-core-3.1.tar.bz2" | tar -xj; \
Joseph Mirabel's avatar
Joseph Mirabel committed
313
314
315
316
317
318
319
320
321
	fi

roboptim-trajectory-3.1.checkout:
	if [ -d $(@:.checkout=) ]; then \
		echo "$(@:.checkout=) already checkout out."; \
	else \
	        wget -O - "https://github.com/roboptim/roboptim-trajectory/releases/download/v3.1/roboptim-trajectory-3.1.tar.bz2" | tar -xj; \
	fi

Joseph Mirabel's avatar
Joseph Mirabel committed
322
323
324
325
326
327
328
doxygen-Release_1_8_10.checkout:
	if [ -d $(@:.checkout=) ]; then \
		echo "$(@:.checkout=) already checkout out."; \
	else \
		wget -O - "https://github.com/doxygen/doxygen/archive/Release_1_8_10.tar.gz" | tar -xz;\
	fi

329
hrp2.configure: hrp2.configure.dep
330
	. ${INSTALL_DIR}/setup.sh; \
Florent Lamiraux's avatar
Florent Lamiraux committed
331
	cd ${SRC_DIR}/hrp2/hrp2_14_description;\
332
333
	mkdir -p ${BUILD_FOLDER}; \
	cd ${SRC_DIR}/hrp2/hrp2_14_description/${BUILD_FOLDER}; \
334
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
335

Florent Lamiraux's avatar
Florent Lamiraux committed
336
hrp2.install: hrp2.configure
337
	${MAKE} -C ${SRC_DIR}/hrp2/hrp2_14_description/${BUILD_FOLDER} install
Florent Lamiraux's avatar
Florent Lamiraux committed
338

339
robot_model_py.configure: robot_model_py.configure.dep
Florent Lamiraux's avatar
Florent Lamiraux committed
340
	cd ${SRC_DIR}/$(@:.configure=)/xml_reflection;\
341
342
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
343
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Florent Lamiraux's avatar
Florent Lamiraux committed
344
	cd ${SRC_DIR}/$(@:.configure=)/urdf_parser_py;\
345
346
	mkdir -p ${BUILD_FOLDER}; \
	cd ${BUILD_FOLDER}; \
347
	cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Marine Heckler's avatar
Marine Heckler committed
348

Florent Lamiraux's avatar
Florent Lamiraux committed
349
robot_model_py.install: robot_model_py.configure
350
351
	${MAKE} -C ${SRC_DIR}/$(@:.install=)/xml_reflection/${BUILD_FOLDER} install; \
	${MAKE} -C ${SRC_DIR}/$(@:.install=)/urdf_parser_py/${BUILD_FOLDER} install;