Makefile 4.97 KB
Newer Older
Florent Lamiraux's avatar
Florent Lamiraux committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# Copyright (c) 2014 CNRS-LAAS
# Author: Florent Lamiraux
#

FCL_REPO=https://github.com/flexible-collision-library
JRL_REPO=https://github.com/jrl-umi3218
LAAS_REPO=https://github.com/laas
HPP_REPO=https://github.com/humanoid-path-planner

SRC_DIR=${DEVEL_DIR}/src
BUILD_TYPE=Debug

fcl_branch=master
fcl_repository=${FCL_REPO}

jrl-mathtools_branch=master
18
jrl-mathtools_repository=${HPP_REPO}
Florent Lamiraux's avatar
Florent Lamiraux committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

hpp-util_branch=master
hpp-util_repository=${HPP_REPO}

roboptim-core_branch=master
roboptim-core_repository=https://github.com/roboptim

roboptim-trajectory_branch=master
roboptim-trajectory_repository=https://github.com/roboptim

hpp-model_branch=master
hpp-model_repository=${HPP_REPO}

hpp-model-urdf_branch=master
hpp-model-urdf_repository=${HPP_REPO}

hpp-core_branch=master
hpp-core_repository=${HPP_REPO}

hpp-template-corba_branch=master
hpp-template-corba_repository=${LAAS_REPO}

hpp-corbaserver_branch=master
hpp-corbaserver_repository=${HPP_REPO}

hpp-constraints_branch=master
hpp-constraints_repository=${HPP_REPO}

hpp-wholebody-step_branch=master
hpp-wholebody-step_repository=${HPP_REPO}

hpp-wholebody-step-corba_branch=master
hpp-wholebody-step-corba_repository=${HPP_REPO}

hpp_ros_branch=master
hpp_ros_repository=${HPP_REPO}

test-hpp_branch=master
test-hpp_repository=${HPP_REPO}

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

Florent Lamiraux's avatar
Florent Lamiraux committed
62
63
64
hpp-hrp2_branch=master
hpp-hrp2_repository=${HPP_REPO}

Florent Lamiraux's avatar
Florent Lamiraux committed
65
66
67
68
69
70
71
72
73
robot_capsule_urdf_branch=groovy
robot_capsule_urdf_repository=${LAAS_REPO}

robot_model_py_branch=groovy
robot_model_py_repository=${LAAS_REPO}

hpp-doc_branch=master
hpp-doc_repository=${HPP_REPO}

Florent Lamiraux's avatar
Florent Lamiraux committed
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
all:
	make eigen3.install; \
	make fcl.install; \
	make jrl-mathtools.install; \
	make hpp-util.install; \
	make roboptim-core.install; \
	make roboptim-trajectory.install; \
	make hpp-model.install; \
	make hpp-model-urdf.install; \
	make hpp-core.install; \
	make hpp-template-corba.install; \
	make hpp-corbaserver.install; \
	make hpp-constraints.install; \
	make hpp-wholebody-step.install; \
	make hpp-wholebody-step-corba.install; \
	make hpp_ros.install; \
	make hpp-doc.install;
Florent Lamiraux's avatar
Florent Lamiraux committed
91

Marine Heckler's avatar
Marine Heckler committed
92
# source $DEVEL_DIR/install/setup.bash before installing hrp2.
Florent Lamiraux's avatar
Florent Lamiraux committed
93
94
95
96
hrp2:
	make robot_model_py.install; \
	make robot_capsule_urdf.install; \
	make hrp2.install; \
Florent Lamiraux's avatar
Florent Lamiraux committed
97
	make hpp-hrp2.install; \
Florent Lamiraux's avatar
Florent Lamiraux committed
98
	make test-hpp.install;
Florent Lamiraux's avatar
Florent Lamiraux committed
99
100
101

%.checkout:
	if [ -d $(@:.checkout=) ]; then \
102
		echo "$(@:.checkout=) already checkout out."; \
Florent Lamiraux's avatar
Florent Lamiraux committed
103
104
105
106
107
108
109
110
111
112
113
114
115
116
	else \
		git clone --recursive -b ${$(@:.checkout=)_branch} ${$(@:.checkout=)_repository}/$(@:.checkout=); \
	fi \

%.update:
	cd ${SRC_DIR}/$(@:.update=);\
	git remote set-url origin ${$(@:.update=)_repository}/$(@:.update=);\
	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

Florent Lamiraux's avatar
Florent Lamiraux committed
117
%.configure:%.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
118
119
120
121
122
	cd ${SRC_DIR}/$(@:.configure=);\
	mkdir -p build; \
	cd ${SRC_DIR}/$(@:.configure=)/build; \
	cmake -DCMAKE_INSTALL_PREFIX=${DEVEL_DIR}/install -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..

Florent Lamiraux's avatar
Florent Lamiraux committed
123
%.install:%.configure
Florent Lamiraux's avatar
Florent Lamiraux committed
124
125
126
127
128
129
130
131
132
133
134
135
136
137
	cd ${SRC_DIR}/$(@:.install=)/build;\
	make install

%.uninstall:
	cd ${SRC_DIR}/$(@:.uninstall=)/build;\
	make uninstall

%.clean:
	cd ${SRC_DIR}/$(@:.clean=)/build;\
	make clean

%.status:
	cd ${SRC_DIR}/$(@:.status=); git status

Florent Lamiraux's avatar
Florent Lamiraux committed
138
hpp-doc.configure: hpp-doc.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
139
140
141
142
143
144
145
	cd ${SRC_DIR}/$(@:.configure=);\
	./bootstrap;\
	mkdir -p build; \
	cd ${SRC_DIR}/$(@:.configure=)/build; \
	../configure --prefix=${DEVEL_DIR}/install

eigen3.checkout:
146
147
148
149
150
151
152
153
	if [ -d $(@:.checkout=) ]; then \
		echo "$(@:.checkout=) already checkout out."; \
	else \
		wget -O eigen3.tar.bz2 \
		http://bitbucket.org/eigen/eigen/get/3.2.1.tar.bz2;\
		cd ${SRC_DIR}; bunzip2 eigen3.tar.bz2; tar xvf eigen3.tar;\
		rm -f eigen3.tar; mv eigen-eigen-6b38706d90a9 eigen3;\
	fi
Florent Lamiraux's avatar
Florent Lamiraux committed
154

Florent Lamiraux's avatar
Florent Lamiraux committed
155
156
157
158
159
160
161
eigen3.configure: eigen3.checkout
	cd ${SRC_DIR}/eigen3;\
	mkdir -p build; \
	cd ${SRC_DIR}/eigen3/build; \
	cmake -DCMAKE_INSTALL_PREFIX=${DEVEL_DIR}/install -DCMAKE_INSTALL_LIBDIR=lib -Dpkg_config_libdir=${DEVEL_DIR}/install/lib ..

hrp2.configure: hrp2.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
162
	. ${DEVEL_DIR}/install/setup.sh; \
Florent Lamiraux's avatar
Florent Lamiraux committed
163
164
165
166
167
	cd ${SRC_DIR}/hrp2/hrp2_14_description;\
	mkdir -p build; \
	cd ${SRC_DIR}/hrp2/hrp2_14_description/build; \
	cmake -DCMAKE_INSTALL_PREFIX=${DEVEL_DIR}/install -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..

Florent Lamiraux's avatar
Florent Lamiraux committed
168
hrp2.install: hrp2.configure
Florent Lamiraux's avatar
Florent Lamiraux committed
169
170
171
	cd ${SRC_DIR}/hrp2/hrp2_14_description/build;\
	make install

Florent Lamiraux's avatar
Florent Lamiraux committed
172
robot_model_py.configure: robot_model_py.checkout
Florent Lamiraux's avatar
Florent Lamiraux committed
173
174
175
176
177
178
179
180
	cd ${SRC_DIR}/$(@:.configure=)/xml_reflection;\
	mkdir -p build; \
	cd build; \
	cmake -DCMAKE_INSTALL_PREFIX=${DEVEL_DIR}/install -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
	cd ${SRC_DIR}/$(@:.configure=)/urdf_parser_py;\
	mkdir -p build; \
	cd build; \
	cmake -DCMAKE_INSTALL_PREFIX=${DEVEL_DIR}/install -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
Marine Heckler's avatar
Marine Heckler committed
181

Florent Lamiraux's avatar
Florent Lamiraux committed
182
robot_model_py.install: robot_model_py.configure
Marine Heckler's avatar
Marine Heckler committed
183
184
185
186
	cd ${SRC_DIR}/$(@:.install=)/xml_reflection/build; \
	make install; \
	cd ${SRC_DIR}/$(@:.install=)/urdf_parser_py/build; \
	make install;