forked from start-jsk/openhrp3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.openhrp3
36 lines (32 loc) · 1.62 KB
/
Makefile.openhrp3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
INSTALL_DIR ?= $(CURDIR)
PATCH_DIR = ${CURDIR}
SVN_DIR = build/OpenHRP-3.1
#SVN_URL = https://openrtp.org/svn/hrg/openhrp/3.1/trunk # for developers only
SVN_URL = https://openrtp.org/svn/hrg/openhrp/3.1/tags/3.1.5/
#SVN_REVISION = -r@REVISION@
SVN_PATCH = ${PATCH_DIR}/patch/OpenHRP2ModelFile.patch ${PATCH_DIR}/patch/FixInertiaColladaModelLoader.patch ${PATCH_DIR}/patch/FixColladaModelLoaderSegmentNames.patch ${PATCH_DIR}/patch/CompileColladaModel.patch ${PATCH_DIR}/patch/CompileIdlPy.patch #
SVN_CMDLINE = svn --non-interactive --trust-server-cert
MK_DIR = $(shell rospack find mk)
NUM_OF_CPUS = $(shell grep -c '^processor' /proc/cpuinfo)
include $(MK_DIR)/svn_checkout.mk
patched_no_makefile: $(SVN_PATCH) ## copy from svn_checkout.mk
ifneq ($(strip $(SVN_PATCH)),)
svn revert -R $(SVN_DIR)
endif
-cd $(SVN_DIR) && $(SVN_CMDLINE) up $(SVN_REVISION)
$(foreach PATCH, $(SVN_PATCH), patch -d $(SVN_DIR) -p0 < $(PATCH) && ) echo patched
touch rospack_nosubdirs
touch patched
installed: $(SVN_DIR) patched_no_makefile
@echo "compile openhrp3 ... "
@echo " PATH=$(PATH)"
@echo " INSTALL_DIR=$(INSTALL_DIR)"
@echo " OPENRTM_DIR=$(OPENRTM_DIR)"
cd $(SVN_DIR) && cmake . -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DENABLE_INSTALL_RPATH=ON -DENABLE_INSTALL_RPATH_TO_SELF=ON -DCOMPILE_JAVA_STUFF=OFF && make VERBOSE=1 -j$(shell if [ $(NUM_OF_CPUS) -gt 4 ] ; then echo "4"; else echo $(NUM_OF_CPUS); fi) && make install
#
# add link
ln -sf SimulationEC.so $(INSTALL_DIR)/lib/libSimulationEC.so
#
touch installed
clean:
-rm -fr installed patched include bin lib share build