2002-04-05 09:52:15 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
OS=$1
|
|
|
|
TOPDIR=$2
|
|
|
|
INST_LIBS=$3
|
|
|
|
INST_PLUGINS=$4
|
|
|
|
INST_INCLUDE=$5
|
2003-03-28 02:56:23 +08:00
|
|
|
INST_EXAMPLES=$6
|
|
|
|
INST_EXAMPLE_SRC=$7
|
2002-04-05 09:52:15 +08:00
|
|
|
INST_DOC=$8
|
|
|
|
INST_DATA=$9
|
|
|
|
|
|
|
|
|
|
|
|
cat <<- EOF
|
|
|
|
|
|
|
|
The following targets can be used with any subsystem as well as the top
|
|
|
|
level build (build in the OSG Root directory). Note that debug versions
|
|
|
|
and optimized version of targets reside in parallel.
|
|
|
|
|
2002-04-12 13:06:41 +08:00
|
|
|
make - Same as 'make opt'
|
|
|
|
make opt - Makes optimized versions of all targets
|
|
|
|
make debug - Makes debug versions of all targets.
|
|
|
|
make clean - Removes all object files (both optimized and debug
|
|
|
|
versions)
|
|
|
|
make cleanopt - Removes optimized version of object files
|
|
|
|
make cleandbg - Removes debug version of object files
|
|
|
|
make cleandepend - Removes Makedepend file (both optimized and debug
|
|
|
|
versions)
|
|
|
|
make cleandependopt - Removes optimized version Makedepend file
|
|
|
|
make cleandependdbg - Removes debug version Makedepend file
|
|
|
|
make cleantarget - Removes only targets but leaves object files (both
|
|
|
|
optimized and debug versions)
|
|
|
|
make cleantargetopt - Removes only optimized targets but leaves optimized
|
|
|
|
objects files.
|
|
|
|
make cleantargetdbg - Removes only debug targets but leaves debug object
|
|
|
|
files
|
|
|
|
make clobber - Removes object files and targets (both optimized and
|
|
|
|
debug versions)
|
|
|
|
make clobberopt - Removes optimized object files and targets
|
|
|
|
make clobberdbg - Removes debug object files and targets
|
|
|
|
make beautify - Pretty print C++ files
|
|
|
|
make docs - Builds documentation database for current target
|
|
|
|
make depend - Force a rebuild of the dependency file. Note that
|
|
|
|
dependency files are generated automatically during
|
|
|
|
builds.
|
2002-04-05 09:52:15 +08:00
|
|
|
|
|
|
|
|
2003-03-13 10:53:40 +08:00
|
|
|
Solaris, IRIX and Linux (some compilers) can build 64 bit targets. These
|
|
|
|
require the ARCH=64 argument. For example:
|
2002-04-05 09:52:15 +08:00
|
|
|
|
2002-04-12 13:06:41 +08:00
|
|
|
make ARCH=64 - Same as 'make ARCH=64 opt'
|
|
|
|
make ARCH=64 opt - Builds 64 bit optimized targets
|
|
|
|
make ARCH=64 debug - Builds 64 bit debug versions of targets
|
|
|
|
make ARCH=64 clean - Removes all 64 bit object files (both optimized and
|
|
|
|
debug versions).
|
2002-04-05 09:52:15 +08:00
|
|
|
|
|
|
|
etc.
|
|
|
|
|
|
|
|
The following targets may only be issued from the top-level OSG build:
|
|
|
|
|
|
|
|
make install - Install both execution environment and development
|
|
|
|
targets
|
|
|
|
make instbin - Install execution environment targets only. These
|
2003-03-28 02:56:23 +08:00
|
|
|
consist of libraries, plugins and example programs.
|
2002-04-05 09:52:15 +08:00
|
|
|
Libraries are installed in
|
|
|
|
o $INST_LIBS,
|
|
|
|
plugins are installed in
|
|
|
|
o $INST_PLUGINS,
|
2003-03-28 02:56:23 +08:00
|
|
|
and examples are installed in
|
|
|
|
o $INST_EXAMPLES
|
2002-04-05 09:52:15 +08:00
|
|
|
on $OS
|
|
|
|
|
|
|
|
make instdev - Install development targets only. These consist of
|
2003-03-28 02:56:23 +08:00
|
|
|
header files, source code to the example programs, and
|
2002-04-05 09:52:15 +08:00
|
|
|
documentation.
|
|
|
|
Header files are install in
|
|
|
|
o $INST_INCLUDE,
|
2003-03-28 02:56:23 +08:00
|
|
|
example source code is installed in
|
|
|
|
o $INST_EXAMPLE_SRC,
|
2002-04-05 09:52:15 +08:00
|
|
|
and documentation is installed in
|
|
|
|
o $INST_DOC
|
|
|
|
on $OS
|
|
|
|
|
|
|
|
make instlinks - Installs symbolic links at install locations for both
|
|
|
|
execution environment and development targets rather
|
|
|
|
than copyied files. Installing links is ideal for a
|
|
|
|
development environment for avoiding confusion about
|
|
|
|
which binaries are being run or linked to.
|
|
|
|
|
|
|
|
make instlinksbin - Installs symbolic links at install locations for
|
|
|
|
execution environment targets only.
|
|
|
|
make instlinksdev - Installs symbolic links at install locations for
|
|
|
|
development targets only
|
|
|
|
make instclean - Removes installed targets (files or links) from
|
|
|
|
installation locations for both execution environment
|
|
|
|
and development targets
|
|
|
|
make instcleanbin - Removes installed targets from installation locations
|
|
|
|
for execution environment targets only
|
|
|
|
make instcleandev - Removes installed targets from installation locations
|
|
|
|
for defelopment targets only
|
|
|
|
|
|
|
|
Note that the following variables can be used to directly override the default
|
|
|
|
installation locations for $OS.
|
|
|
|
|
|
|
|
make INST_LIBS=<libs_location> \\
|
|
|
|
INST_PLUGINS=<plugins_location>\\
|
|
|
|
INST_INCLUDE=<header_file_location>\\
|
2003-03-28 02:56:23 +08:00
|
|
|
INST_EXAMPLES=<examples_location>\\
|
|
|
|
INST_EXAMPLE_SRC=<example_src_location>\\
|
2002-04-05 09:52:15 +08:00
|
|
|
INST_DOC=<doc_location>\\
|
|
|
|
install
|
|
|
|
|
|
|
|
- Installs libraries in <libs_location>, plugins in
|
|
|
|
<plugins_location>, header files in
|
2003-03-28 02:56:23 +08:00
|
|
|
<header_file_location>, examples in <examples_location>,
|
|
|
|
example source code in <example_src_location> and
|
2002-04-05 09:52:15 +08:00
|
|
|
documentation in <doc_location>
|
|
|
|
|
2003-03-13 10:53:40 +08:00
|
|
|
Note also that INST_LIBS, INST_PLUGINS, INST_INCLUDE, and INST_SHARE share
|
2003-04-24 21:45:35 +08:00
|
|
|
a common prefix by default: INST_LOCATION. Further INST_EXAMPLES, INST_EXAMPLE_SRC,
|
2003-03-13 10:53:40 +08:00
|
|
|
INST_DOC, and INST_DATA share a common prefix by default : INST_SHARE, which
|
|
|
|
is located under INST_LOCATION by default. This provides a short cut for the
|
|
|
|
above 'make' usage. For example,
|
2002-04-05 09:52:15 +08:00
|
|
|
|
2003-03-13 10:53:40 +08:00
|
|
|
make INST_LOCATION=/usr/local/OpenSceneGraph \\
|
|
|
|
INST_SHARE=/usr/share/OpenSceneGraph \\
|
2002-04-05 09:52:15 +08:00
|
|
|
install
|
|
|
|
|
|
|
|
|
|
|
|
These values can be tested by reissuing 'make help' with these arguments.
|
|
|
|
|
|
|
|
After doing a 'make install' or 'make instlinks', and if not already added,
|
|
|
|
add
|
|
|
|
|
2003-03-28 02:56:23 +08:00
|
|
|
$INST_EXAMPLES
|
2002-04-05 09:52:15 +08:00
|
|
|
|
2003-03-28 02:56:23 +08:00
|
|
|
to your PATH environmental variable to run the examples. If it is not already
|
2002-04-05 09:52:15 +08:00
|
|
|
present, add
|
|
|
|
|
|
|
|
$INST_LIBS
|
|
|
|
|
|
|
|
and
|
|
|
|
|
|
|
|
$INST_PLUGINS
|
|
|
|
|
|
|
|
to your LD_LIBRARY_PATH environmental variable. When compiling programs
|
|
|
|
using OSG headers add to your -I compile flags:
|
|
|
|
|
|
|
|
$INST_INCLUDE
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
exit 0
|