In this page we describe how to compile the OpenHRP source files extracted from its source package, by using Make command. On Linux, using Make command is the common way of compiling. As for Windows, we usually use Visual C++ IDE(Integrated Development Environment) for compiling process. Refer "Installing OpenHRP on Windows" for more.Upto OpenHRP-3.0.0-RC3, we used DOS based command-line compilation procedure for windows, but it is not supported anymore. Extracting source packageFirst, extract the downloaded source package "OpenHRP-xxx.zip", to a directory where ever you want, using what ever a ZIP extraction tool you use. ('xxx' refers to the version of OpenHRP package, such as '3.0.0-RC4'. Please substitute the version of the downloaded file, with 'xxx'.) Extracting to an appropriate directory under users home directory, is the common manner on Linux platforms. About Make.varsWhen using Make command, configuration settings to compile OpenHRP are defined in a file named "Make.vars", placed in the source directory. In this file, Configuration items and contents are basically defined as following format; DYNAMICS_ENGINE = aist OB_DIR = JDK_DIR = $(HOME)/usr/jdk1.5.0_07 BOOST_INC_DIR = BOOST_LIB_DIR = BOOST_LIB_SFX = -mt TVMET_INC_DIR = $(HOME)/usr/tvmet-1.7.1/include NS_HOST = localhost NS_PORT = 2809 Since this file is included by "Makefile", the syntax of both files are almost same. For example, the values of environment variables can be derived by specifying "$(Variable _Name)"and the line starting with '#' mark become commented. Most of the configuration settings of this file are to indicate the locations of programs or libraries, that required for compiling. Basically, it is not necessary to configure "Make.vars", if the programs and libraries are already available in the OS or compile tool by default. You will have to do it only if, the programs and libraries installed by yourselves are not included in the SYSTEM PATH of your OS or compile tool. Usually, these settings are done by an automatic-setup-script called "configure". However such a script is not available for OpenHRP at the moment. Since we introduced installing CMake for OpenHRP-3.1.0(β) this portion is scheduled to be cover in series 3.1. Creating Make.varsWe have prepared a some Make.vars files(placed on source sirectory) as templates for diffrent OS/Distributions. Please select one of following that applys with your system/version.
Copy the selected file to the top directory of the source renaming as "Make.vars". Configuration contents of Make.varsModify the copied Make.vars file as necessary. Following table describes the meaning of main configuration items in Make.vars. However, there are some configuration items that have not explained here, and even these configuration contents can also be changed in future versions. So not only this table, but it is better to refer the comments along with configuration items described in the template file.
(1) : Edit 'bin/unix/config.sh' to make changes, while runtime. The following items related with directory path, must be kept blank, if the packages are installed in its default paths(In /usr, /usr/local or any pre-defined path by user) such as systems' binary path(/usr/bin), include path(/usr/include), library path (/usr/lib).
The paths including space characters would not be accessible by coomand-line. So please be careful not to include space characters in your package install paths. Make command executionTo start compilation, move to the top directory of OpenHRP source using Terminal, and run 'make' command. If there are compile errors, refer the error message carefully and check whether the required programs and libraries have been installed properly, or whether the configuration settings of Make.vars are correct. Notice that current Makefile contains some parts lacking with precise specification for dependencies. Therefore if you wish to re-configure and compile again, it would be better to run "make clean" once, and bring the system back to the initial condition. |