| 1 |
# ----------------------------------------------------------------------------- |
|---|
| 2 |
# $Id$ |
|---|
| 3 |
# |
|---|
| 4 |
# Base Makefile.in for VR Juggler. It requires GNU make. |
|---|
| 5 |
# ----------------------------------------------------------------------------- |
|---|
| 6 |
# Targets are: |
|---|
| 7 |
# |
|---|
| 8 |
# world - Build and install everything. |
|---|
| 9 |
# world-all-abi - Build and install everything usnig all supported ABIs. |
|---|
| 10 |
# buildworld - Build everything (same as 'all'). |
|---|
| 11 |
# installworld - Install everything (same as 'install-all'). This requires |
|---|
| 12 |
# that 'buildworld' be successfully completed beforehand. |
|---|
| 13 |
# |
|---|
| 14 |
# all - Build everything. |
|---|
| 15 |
# all-abi - Build everything using all supported ABIs. |
|---|
| 16 |
# debug - Build the VR Juggler libraries (dynamic and static) with |
|---|
| 17 |
# debugging symbols turned on. |
|---|
| 18 |
# dbg - Build the debugging, static copy of the libraries. |
|---|
| 19 |
# ddso - Build the debugging, dynamic shared object version of the |
|---|
| 20 |
# libraries. |
|---|
| 21 |
# optim - Build the VR Juggler libraries (dynamic and static) with |
|---|
| 22 |
# optimization flags enabled. |
|---|
| 23 |
# opt - Build the optimized, static version of the libraries. |
|---|
| 24 |
# dso - Build the dynamic shared object version of the libraries. |
|---|
| 25 |
# obj - Build the object files using the default value for |
|---|
| 26 |
# ${OBJDIR}. |
|---|
| 27 |
# gui - Build the Java-based configuration GUI. |
|---|
| 28 |
# |
|---|
| 29 |
# links - Define links (for developer use only) that provide |
|---|
| 30 |
# functionality allowing the use of the $VJ_BASE_DIR |
|---|
| 31 |
# environment variable. |
|---|
| 32 |
# clean-links - Remove the symlinks created by 'links'. |
|---|
| 33 |
# |
|---|
| 34 |
# static-libs - Build the static version of the libraries. This target |
|---|
| 35 |
# depends on a correct value for ${LIBDIR} (that does not |
|---|
| 36 |
# have a default value). |
|---|
| 37 |
# shared-libs - Build the dynamic shared version of the libraries. This |
|---|
| 38 |
# target depends on a correct value for ${LIBDIR} (that does |
|---|
| 39 |
# not have a default value). |
|---|
| 40 |
# |
|---|
| 41 |
# install-all - Install all versions of the libraries, all header files, |
|---|
| 42 |
# the Data directory, the configuration GUI and the test |
|---|
| 43 |
# code. |
|---|
| 44 |
# install-all-abi - Install every ABI possible on the target platform. |
|---|
| 45 |
# install - Install the full debugging version of VR Juggler (with |
|---|
| 46 |
# both static and dynamic libraries). |
|---|
| 47 |
# install-debug - Same as 'install'. |
|---|
| 48 |
# install-dbg - Install the debugging, static version of the libraries. |
|---|
| 49 |
# install-ddso - Install the debugging, dynamic shared object version of |
|---|
| 50 |
# the libraries. |
|---|
| 51 |
# install-optim - Install the full optimized version of VR Juggler (with |
|---|
| 52 |
# both static and dynamic libraries). |
|---|
| 53 |
# install-opt - Install the optimized, static version of the libraries. |
|---|
| 54 |
# install-dso - Install the dynamic shared object version of the libraries. |
|---|
| 55 |
# install-headers - Install only the header files. |
|---|
| 56 |
# install-test - Install only the test code. |
|---|
| 57 |
# install-data - Install only the Data directory. |
|---|
| 58 |
# install-gui - Install only the configuration GUI. |
|---|
| 59 |
# |
|---|
| 60 |
# clean - Clean up everything (uses common 'clean' target). |
|---|
| 61 |
# cleandepend - Clean up the dependency files (uses common 'cleandepend' |
|---|
| 62 |
# target). |
|---|
| 63 |
# clobber - Clean up everything and remove the directories containing |
|---|
| 64 |
# the compiled libraries and its object files. |
|---|
| 65 |
# |
|---|
| 66 |
# info - Print out information about the build process that may be |
|---|
| 67 |
# useful to the user. |
|---|
| 68 |
# |
|---|
| 69 |
# The default target is 'dbg'. 'install' will install the debugging, static |
|---|
| 70 |
# version of the libraries. |
|---|
| 71 |
# ----------------------------------------------------------------------------- |
|---|
| 72 |
|
|---|
| 73 |
default: debug |
|---|
| 74 |
|
|---|
| 75 |
# Define ${_LOCAL_CLEAN} and ${_LOCAL_CLEANDEP} to inform the shared 'clean' |
|---|
| 76 |
# and 'cleandepend' targets that there is a '_clean' target and a |
|---|
| 77 |
# '_cleandepend' target to be run besides the standard targets. This must |
|---|
| 78 |
# be done before Makefile.base is inlcuded (which in turn includes vj.clean.mk) |
|---|
| 79 |
# so that the variable will be defined when parsing reaches the test for it. |
|---|
| 80 |
_LOCAL_CLEAN = 1 |
|---|
| 81 |
_LOCAL_CLEANDEP = 1 |
|---|
| 82 |
|
|---|
| 83 |
# Include common definitions. |
|---|
| 84 |
include @topdir@/Makefile.base |
|---|
| 85 |
|
|---|
| 86 |
# Variables whose values are specific to this file. |
|---|
| 87 |
includedir = @includedir@ |
|---|
| 88 |
instlinks = ${topdir}/instlinks |
|---|
| 89 |
srcdir = @srcdir@ |
|---|
| 90 |
top_srcdir = @top_srcdir@ |
|---|
| 91 |
VJROOT = ${top_srcdir} |
|---|
| 92 |
VJ_SRCDIR = @VJ_SRCDIR@ |
|---|
| 93 |
WORKDIR = ${topdir} |
|---|
| 94 |
|
|---|
| 95 |
# Extra compiler and linker options needed only by this file. |
|---|
| 96 |
DBG_FLAGS = -D_DEBUG @DBG_FLAGS@ |
|---|
| 97 |
OPT_FLAGS = -D_OPT -O @OPT_FLAGS@ |
|---|
| 98 |
|
|---|
| 99 |
# SGI-specific dynamic-shared-object information. |
|---|
| 100 |
DSOREGFILE = @DSOREGFILE@ |
|---|
| 101 |
DSOVERSION = @DSOVERSION@ |
|---|
| 102 |
DSOVERSIONOPTS = @DSOVERSIONOPTS@ |
|---|
| 103 |
|
|---|
| 104 |
# Append ${DSOVERSIONOPTS} to ${LDOPTS} so that those extra options (if any) |
|---|
| 105 |
# will be used by ${LD}. |
|---|
| 106 |
LDOPTS := ${LDOPTS} ${DSOVERSIONOPTS} |
|---|
| 107 |
|
|---|
| 108 |
# State whether or not to build the configuration editor GUI. |
|---|
| 109 |
BUILD_GUI = @BUILD_GUI@ |
|---|
| 110 |
|
|---|
| 111 |
# ============================================================================= |
|---|
| 112 |
# Build and installation directory naming and permission information. |
|---|
| 113 |
# ============================================================================= |
|---|
| 114 |
_DEBUG_DIR = debug |
|---|
| 115 |
_OPT_DIR = opt |
|---|
| 116 |
_DEFAULT_DIR = ${_DEBUG_DIR} |
|---|
| 117 |
|
|---|
| 118 |
_UMASK = 002 |
|---|
| 119 |
_FILE_PERMS = 664 |
|---|
| 120 |
_EXEC_PERMS = 775 |
|---|
| 121 |
_GROUP_NAME = vrjuggler |
|---|
| 122 |
|
|---|
| 123 |
# ------------------------------------------------ |
|---|
| 124 |
# Object file build and installation directories. |
|---|
| 125 |
# ------------------------------------------------ |
|---|
| 126 |
_BUILDDIR_BASE = ${topdir}/obj |
|---|
| 127 |
_BUILDDIR = ${_BUILDDIR_BASE}/${PLATFORM}/${ABI}/${ISA} |
|---|
| 128 |
_DBG_BUILDDIR = ${_BUILDDIR}/${_DEBUG_DIR} |
|---|
| 129 |
_OPT_BUILDDIR = ${_BUILDDIR}/${_OPT_DIR} |
|---|
| 130 |
|
|---|
| 131 |
# -------------------------------------------- |
|---|
| 132 |
# Library build and installation directories. |
|---|
| 133 |
# -------------------------------------------- |
|---|
| 134 |
|
|---|
| 135 |
# ${_install_libdir_abs} is the full path to the base directory (minus any |
|---|
| 136 |
# debugging or optimized subdirectories) where the libraries will be |
|---|
| 137 |
# installed. ${_install_libdir_rel} is only the ${ISA} subdirectory of the |
|---|
| 138 |
# full path. |
|---|
| 139 |
_install_libdir_abs = ${libdir}${LIBBITSUF}/${ISA} |
|---|
| 140 |
_install_libdir_rel = ./${ISA} |
|---|
| 141 |
|
|---|
| 142 |
# ${_LIBDIR_NAME} is the name of the library directory including an ABI suffix |
|---|
| 143 |
# if applicable. |
|---|
| 144 |
_LIBDIR_NAME = lib${LIBBITSUF} |
|---|
| 145 |
|
|---|
| 146 |
# ${_LIBDIR_BASE} is the base directory where the libraries will be built. |
|---|
| 147 |
_LIBDIR_BASE = ${topdir}/${_LIBDIR_NAME} |
|---|
| 148 |
|
|---|
| 149 |
# ${_LIBDIR} is the first-level subdirectory of ${_LIBDIR_BASE} that is |
|---|
| 150 |
# named by the instruction set being used (${ISA}). |
|---|
| 151 |
_LIBDIR = ${_LIBDIR_BASE}/${ISA} |
|---|
| 152 |
|
|---|
| 153 |
# ${_DBG_LIBDIR} and ${_OPT_LIBDIR} are the directories where the libraries |
|---|
| 154 |
# are actually built. The first is for a debugging copy of the libraries and |
|---|
| 155 |
# the second is for an optimized version of the libraries. |
|---|
| 156 |
_DBG_LIBDIR = ${_LIBDIR}/${_DEBUG_DIR} |
|---|
| 157 |
_OPT_LIBDIR = ${_LIBDIR}/${_OPT_DIR} |
|---|
| 158 |
|
|---|
| 159 |
SHLIB_MAJOR = 1 |
|---|
| 160 |
SHLIB_MINOR = 0 |
|---|
| 161 |
|
|---|
| 162 |
# Full names of the static and dynamic versions of the libraries. |
|---|
| 163 |
VJ_LIB_STATIC = ${VJ_LIBRARY}.a |
|---|
| 164 |
VJ_LIB_DYNAMIC = ${VJ_LIBRARY}.@SHAREDLIB_EXT@ |
|---|
| 165 |
|
|---|
| 166 |
GL_API = @OPENGL_API@ |
|---|
| 167 |
GL_LIB_STATIC = ${GL_LIBRARY}.a |
|---|
| 168 |
GL_LIB_DYNAMIC = ${GL_LIBRARY}.@SHAREDLIB_EXT@ |
|---|
| 169 |
|
|---|
| 170 |
PF_API = @PERFORMER_API@ |
|---|
| 171 |
PF_LIB_STATIC = ${PF_LIBRARY}.a |
|---|
| 172 |
PF_LIB_DYNAMIC = ${PF_LIBRARY}.@SHAREDLIB_EXT@ |
|---|
| 173 |
|
|---|
| 174 |
# ============================================================================= |
|---|
| 175 |
# Lists used for various types of recursion. |
|---|
| 176 |
# ============================================================================= |
|---|
| 177 |
|
|---|
| 178 |
# Subdirectories used for recursion through the source tree. |
|---|
| 179 |
SUBDIRS = Math Config Kernel Environment Performance Input \ |
|---|
| 180 |
SharedMem Sync Threads |
|---|
| 181 |
|
|---|
| 182 |
# Subdirectories used for recursion through the test source tree when |
|---|
| 183 |
# installing. |
|---|
| 184 |
TEST_SUBDIRS = . CfgTest Math Matrix Quat Sync input ogl ogl/combo \ |
|---|
| 185 |
ogl/cubes ogl/glove ogl/simpleGlove ogl/torus \ |
|---|
| 186 |
ogl/wand pfNav testDynamicCastSTL threads |
|---|
| 187 |
|
|---|
| 188 |
# The list of ABIs supported on this platform. |
|---|
| 189 |
ABI_LIST = @ABI_LIST@ |
|---|
| 190 |
|
|---|
| 191 |
# ============================================================================= |
|---|
| 192 |
# Library targets. The default is 'dbg' as defined above. The steps for |
|---|
| 193 |
# building the 'dbg', 'ddso', 'opt' and 'dso' are as follows: |
|---|
| 194 |
# |
|---|
| 195 |
# 1) Build dependencies (if necessary). |
|---|
| 196 |
# 2) Compile all object files that are out of date. |
|---|
| 197 |
# 3) Compile the actual libraries from the object files. |
|---|
| 198 |
# 4) Build the Java-based config editor (if necessary). |
|---|
| 199 |
# 5) Set up the developer installation links. |
|---|
| 200 |
# ============================================================================= |
|---|
| 201 |
|
|---|
| 202 |
# Include recursive target code. |
|---|
| 203 |
include ${MKPATH}/vj.rec.mk |
|---|
| 204 |
|
|---|
| 205 |
# ------------------------------------------------ |
|---|
| 206 |
# Build and install everything (i.e., the world). |
|---|
| 207 |
# ------------------------------------------------ |
|---|
| 208 |
world: |
|---|
| 209 |
@echo "===============================================================" |
|---|
| 210 |
@echo ">>> VR Juggler make world started on `LTIME=C date`" |
|---|
| 211 |
@echo "===============================================================" |
|---|
| 212 |
ifndef NO_CLEAN |
|---|
| 213 |
@${MAKE} clobber |
|---|
| 214 |
endif |
|---|
| 215 |
@${MAKE} _libs |
|---|
| 216 |
@${MAKE} gui |
|---|
| 217 |
@echo "---------------------------------------------------------------" |
|---|
| 218 |
@echo "Beginning VR Juggler installation process" |
|---|
| 219 |
@echo "---------------------------------------------------------------" |
|---|
| 220 |
@${MAKE} beforeinstall |
|---|
| 221 |
@${MAKE} _install_libs |
|---|
| 222 |
@${MAKE} _install_post_libs |
|---|
| 223 |
@echo "===============================================================" |
|---|
| 224 |
@echo ">>> VR Juggler make world completed on `LTIME=C date`" |
|---|
| 225 |
@echo "===============================================================" |
|---|
| 226 |
|
|---|
| 227 |
# ------------------------------------------------------------------------ |
|---|
| 228 |
# Build and install everything (i.e., the world) using all possible ABIs. |
|---|
| 229 |
# ------------------------------------------------------------------------ |
|---|
| 230 |
world-all-abi: |
|---|
| 231 |
@echo "===============================================================" |
|---|
| 232 |
@echo ">>> VR Juggler make world started on `LTIME=C date`" |
|---|
| 233 |
@echo "===============================================================" |
|---|
| 234 |
ifndef NO_CLEAN |
|---|
| 235 |
@${MAKE} clobber |
|---|
| 236 |
endif |
|---|
| 237 |
@abi_list='${ABI_LIST}' ; \ |
|---|
| 238 |
for abi in $$abi_list ; do \ |
|---|
| 239 |
echo "------------------------------------------------" ; \ |
|---|
| 240 |
echo "Building libraries using $$abi" ; \ |
|---|
| 241 |
echo "------------------------------------------------" ; \ |
|---|
| 242 |
${MAKE} vjABI=$$abi _libs ; \ |
|---|
| 243 |
done |
|---|
| 244 |
@${MAKE} gui |
|---|
| 245 |
@echo "---------------------------------------------------------------" |
|---|
| 246 |
@echo "Beginning VR Juggler installation process" |
|---|
| 247 |
@echo "---------------------------------------------------------------" |
|---|
| 248 |
@${MAKE} beforeinstall |
|---|
| 249 |
@abi_list='${ABI_LIST}' ; \ |
|---|
| 250 |
for abi in $$abi_list ; do \ |
|---|
| 251 |
echo "------------------------------------------------" ; \ |
|---|
| 252 |
echo "Installing $$abi version of libraries" ; \ |
|---|
| 253 |
echo "------------------------------------------------" ; \ |
|---|
| 254 |
${MAKE} vjABI=$$abi _install_libs ; \ |
|---|
| 255 |
done |
|---|
| 256 |
@${MAKE} _install_post_libs |
|---|
| 257 |
@echo "===============================================================" |
|---|
| 258 |
@echo ">>> VR Juggler make world completed on `LTIME=C date`" |
|---|
| 259 |
@echo "===============================================================" |
|---|
| 260 |
|
|---|
| 261 |
# ------------------------------------------ |
|---|
| 262 |
# Build all four versions of the libraries. |
|---|
| 263 |
# ------------------------------------------ |
|---|
| 264 |
all buildworld: |
|---|
| 265 |
@echo "===============================================================" |
|---|
| 266 |
@echo "Building everything" |
|---|
| 267 |
@echo "===============================================================" |
|---|
| 268 |
@${MAKE} beforebuild |
|---|
| 269 |
@${MAKE} _libs |
|---|
| 270 |
@${MAKE} gui |
|---|
| 271 |
@${MAKE} afterbuild |
|---|
| 272 |
@echo "===============================================================" |
|---|
| 273 |
@echo "$@ complete" |
|---|
| 274 |
@echo "===============================================================" |
|---|
| 275 |
|
|---|
| 276 |
# ------------------------------- |
|---|
| 277 |
# Build all ABIs in ${ABI_LIST}. |
|---|
| 278 |
# ------------------------------- |
|---|
| 279 |
all-abi: |
|---|
| 280 |
@echo "===============================================================" |
|---|
| 281 |
@echo "Building everything using all ABIs" |
|---|
| 282 |
@echo "===============================================================" |
|---|
| 283 |
@${MAKE} beforebuild |
|---|
| 284 |
@abi_list='${ABI_LIST}' ; \ |
|---|
| 285 |
for abi in $$abi_list ; do \ |
|---|
| 286 |
echo "------------------------------------------------" ; \ |
|---|
| 287 |
echo "Building libraries using $$abi" ; \ |
|---|
| 288 |
echo "------------------------------------------------" ; \ |
|---|
| 289 |
${MAKE} vjABI=$$abi _libs ; \ |
|---|
| 290 |
done |
|---|
| 291 |
@${MAKE} gui |
|---|
| 292 |
@${MAKE} afterbuild |
|---|
| 293 |
@echo "===============================================================" |
|---|
| 294 |
@echo "$@ complete" |
|---|
| 295 |
@echo "===============================================================" |
|---|
| 296 |
|
|---|
| 297 |
# Things to do before the object files and library are built. |
|---|
| 298 |
beforebuild: |
|---|
| 299 |
|
|---|
| 300 |
# Things to do after the object files and library are built. |
|---|
| 301 |
afterbuild: |
|---|
| 302 |
@${MAKE} links |
|---|
| 303 |
|
|---|
| 304 |
# Build the optimized and debugging object files, static libraries and |
|---|
| 305 |
# shared libraries. Once this has been done, make the links in ${_LIBDIR}. |
|---|
| 306 |
_libs: |
|---|
| 307 |
@${MAKE} _build_opt_obj |
|---|
| 308 |
@${MAKE} _build_opt_lib_static |
|---|
| 309 |
@${MAKE} _build_opt_lib_shared |
|---|
| 310 |
@${MAKE} _build_dbg_obj |
|---|
| 311 |
@${MAKE} _build_dbg_lib_static |
|---|
| 312 |
@${MAKE} _build_dbg_lib_shared |
|---|
| 313 |
@${MAKE} _LIB_LINK_DIR="${_LIBDIR}" _lib_links |
|---|
| 314 |
|
|---|
| 315 |
# Make symlinks in ${_LIB_LINK_DIR} pointing to the library binaries in |
|---|
| 316 |
# ${_DEFAULT_DIR}. |
|---|
| 317 |
_lib_links: |
|---|
| 318 |
@echo "------------------------------------------------" |
|---|
| 319 |
@echo "Creating symlinks in ${_LIB_LINK_DIR}" |
|---|
| 320 |
@echo "------------------------------------------------" |
|---|
| 321 |
cd ${_LIB_LINK_DIR} && ln -sf ${_DEFAULT_DIR}/${VJ_LIB_STATIC} ./ |
|---|
| 322 |
cd ${_LIB_LINK_DIR} && ln -sf ${_DEFAULT_DIR}/${VJ_LIB_DYNAMIC} ./ |
|---|
| 323 |
ifeq (${GL_API}, Y) |
|---|
| 324 |
cd ${_LIB_LINK_DIR} && ln -sf ${_DEFAULT_DIR}/${GL_LIB_STATIC} ./ |
|---|
| 325 |
cd ${_LIB_LINK_DIR} && ln -sf ${_DEFAULT_DIR}/${GL_LIB_DYNAMIC} ./ |
|---|
| 326 |
endif |
|---|
| 327 |
ifeq (${PF_API}, Y) |
|---|
| 328 |
cd ${_LIB_LINK_DIR} && ln -sf ${_DEFAULT_DIR}/${PF_LIB_STATIC} ./ |
|---|
| 329 |
cd ${_LIB_LINK_DIR} && ln -sf ${_DEFAULT_DIR}/${PF_LIB_DYNAMIC} ./ |
|---|
| 330 |
endif |
|---|
| 331 |
|
|---|
| 332 |
# ---------------------------------------------------------------------------- |
|---|
| 333 |
# Make the debugging version of the libraries building both static and shared |
|---|
| 334 |
# versions of the library binaries. |
|---|
| 335 |
# ---------------------------------------------------------------------------- |
|---|
| 336 |
debug: |
|---|
| 337 |
@echo "========================================================" |
|---|
| 338 |
@echo "Making debugging version of VR Juggler" |
|---|
| 339 |
@echo "========================================================" |
|---|
| 340 |
@${MAKE} beforebuild |
|---|
| 341 |
@${MAKE} _build_dbg_obj |
|---|
| 342 |
@${MAKE} _build_dbg_lib_static |
|---|
| 343 |
@${MAKE} _build_dbg_lib_shared |
|---|
| 344 |
@${MAKE} gui |
|---|
| 345 |
@${MAKE} afterbuild |
|---|
| 346 |
@echo "========================================================" |
|---|
| 347 |
@echo "$@ complete" |
|---|
| 348 |
@echo "========================================================" |
|---|
| 349 |
|
|---|
| 350 |
# --------------------------------------------- |
|---|
| 351 |
# Make the debugging version of the libraries. |
|---|
| 352 |
# --------------------------------------------- |
|---|
| 353 |
dbg: |
|---|
| 354 |
@echo "========================================================" |
|---|
| 355 |
@echo "Making DBG version of VR Juggler" |
|---|
| 356 |
@echo "========================================================" |
|---|
| 357 |
@${MAKE} beforebuild |
|---|
| 358 |
@${MAKE} _build_dbg_obj |
|---|
| 359 |
@${MAKE} _build_dbg_lib_static |
|---|
| 360 |
@${MAKE} gui |
|---|
| 361 |
@${MAKE} afterbuild |
|---|
| 362 |
@echo "========================================================" |
|---|
| 363 |
@echo "$@ complete" |
|---|
| 364 |
@echo "========================================================" |
|---|
| 365 |
|
|---|
| 366 |
# ------------------------------------------------------------ |
|---|
| 367 |
# Make the debugging version of the libraries that uses DSOs. |
|---|
| 368 |
# ------------------------------------------------------------ |
|---|
| 369 |
ddso: |
|---|
| 370 |
@echo "========================================================" |
|---|
| 371 |
@echo "Making DBG version of VR Juggler" |
|---|
| 372 |
@echo "========================================================" |
|---|
| 373 |
@${MAKE} beforebuild |
|---|
| 374 |
@${MAKE} _build_dbg_obj |
|---|
| 375 |
@${MAKE} _build_dbg_lib_shared |
|---|
| 376 |
@${MAKE} gui |
|---|
| 377 |
@${MAKE} afterbuild |
|---|
| 378 |
@echo "========================================================" |
|---|
| 379 |
@echo "$@ complete" |
|---|
| 380 |
@echo "========================================================" |
|---|
| 381 |
|
|---|
| 382 |
# ---------------------------------------------------------------------------- |
|---|
| 383 |
# Make the optimized version of the libraries building both static and shared |
|---|
| 384 |
# versions of the library binaries. |
|---|
| 385 |
# ---------------------------------------------------------------------------- |
|---|
| 386 |
optim: |
|---|
| 387 |
@echo "========================================================" |
|---|
| 388 |
@echo "Making optimized version of VR Juggler" |
|---|
| 389 |
@echo "========================================================" |
|---|
| 390 |
@${MAKE} beforebuild |
|---|
| 391 |
@${MAKE} _build_opt_obj |
|---|
| 392 |
@${MAKE} _build_opt_lib_static |
|---|
| 393 |
@${MAKE} _build_opt_lib_shared |
|---|
| 394 |
@${MAKE} gui |
|---|
| 395 |
@${MAKE} afterbuild |
|---|
| 396 |
@echo "========================================================" |
|---|
| 397 |
@echo "$@ complete" |
|---|
| 398 |
@echo "========================================================" |
|---|
| 399 |
|
|---|
| 400 |
# --------------------------------------------- |
|---|
| 401 |
# Make the optimized version of the libraries. |
|---|
| 402 |
# --------------------------------------------- |
|---|
| 403 |
opt: |
|---|
| 404 |
@echo "========================================================" |
|---|
| 405 |
@echo "Making OPT version of VR Juggler" |
|---|
| 406 |
@echo "========================================================" |
|---|
| 407 |
@${MAKE} beforebuild |
|---|
| 408 |
@${MAKE} _build_opt_obj |
|---|
| 409 |
@${MAKE} _build_opt_lib_static |
|---|
| 410 |
@${MAKE} gui |
|---|
| 411 |
@${MAKE} afterbuild |
|---|
| 412 |
@echo "========================================================" |
|---|
| 413 |
@echo "$@ complete" |
|---|
| 414 |
@echo "========================================================" |
|---|
| 415 |
|
|---|
| 416 |
# ------------------------------------------------------------ |
|---|
| 417 |
# Make the optimized version of the libraries that uses DSOs. |
|---|
| 418 |
# ------------------------------------------------------------ |
|---|
| 419 |
dso: |
|---|
| 420 |
@echo "========================================================" |
|---|
| 421 |
@echo "Making OPT version of VR Juggler" |
|---|
| 422 |
@echo "========================================================" |
|---|
| 423 |
@${MAKE} beforebuild |
|---|
| 424 |
@${MAKE} _build_opt_obj |
|---|
| 425 |
@${MAKE} _build_opt_lib_shared |
|---|
| 426 |
@${MAKE} gui |
|---|
| 427 |
@${MAKE} afterbuild |
|---|
| 428 |
@echo "========================================================" |
|---|
| 429 |
@echo "$@ complete" |
|---|
| 430 |
@echo "========================================================" |
|---|
| 431 |
|
|---|
| 432 |
# Build the object files with the debugging flags enabled. |
|---|
| 433 |
_build_dbg_obj: |
|---|
| 434 |
@echo "------------------------------------------------" |
|---|
| 435 |
@echo "Building object files with debugging symbols" |
|---|
| 436 |
@echo "------------------------------------------------" |
|---|
| 437 |
/bin/sh ${scriptdir}/mkinstalldirs ${_DBG_BUILDDIR} |
|---|
| 438 |
@${MAKE} RECTARGET="dbg" OPTIMIZER="${DBG_FLAGS}" \ |
|---|
| 439 |
BASE_OBJDIR="${_DBG_BUILDDIR}" recursive |
|---|
| 440 |
|
|---|
| 441 |
# Build the object files with the optimization flags enabled. |
|---|
| 442 |
_build_opt_obj: |
|---|
| 443 |
@echo "------------------------------------------------" |
|---|
| 444 |
@echo "Building optimized object files" |
|---|
| 445 |
@echo "------------------------------------------------" |
|---|
| 446 |
/bin/sh ${scriptdir}/mkinstalldirs ${_OPT_BUILDDIR} |
|---|
| 447 |
@${MAKE} RECTARGET="opt" OPTIMIZER="${OPT_FLAGS}" \ |
|---|
| 448 |
BASE_OBJDIR="${_OPT_BUILDDIR}" recursive |
|---|
| 449 |
|
|---|
| 450 |
# Build the static libraries with the debugging flags enabled. |
|---|
| 451 |
_build_dbg_lib_static: |
|---|
| 452 |
@echo "================================================" |
|---|
| 453 |
@echo "Building static debugging libraries" |
|---|
| 454 |
@echo "================================================" |
|---|
| 455 |
@${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}" LIBDIR="${_DBG_LIBDIR}" \ |
|---|
| 456 |
${_DBG_LIBDIR}/${VJ_LIB_STATIC} |
|---|
| 457 |
ifeq (${GL_API}, Y) |
|---|
| 458 |
@${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/GL" \ |
|---|
| 459 |
LIBDIR="${_DBG_LIBDIR}" ${_DBG_LIBDIR}/${GL_LIB_STATIC} |
|---|
| 460 |
endif |
|---|
| 461 |
ifeq (${PF_API}, Y) |
|---|
| 462 |
@${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/Pf" \ |
|---|
| 463 |
LIBDIR="${_DBG_LIBDIR}" ${_DBG_LIBDIR}/${PF_LIB_STATIC} |
|---|
| 464 |
endif |
|---|
| 465 |
|
|---|
| 466 |
# Build the shared libraries with the debugging flags enabled. |
|---|
| 467 |
_build_dbg_lib_shared: |
|---|
| 468 |
@echo "================================================" |
|---|
| 469 |
@echo "Building shared debugging libraries" |
|---|
| 470 |
@echo "================================================" |
|---|
| 471 |
@${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}" LIBDIR="${_DBG_LIBDIR}" \ |
|---|
| 472 |
${_DBG_LIBDIR}/${VJ_LIB_DYNAMIC} |
|---|
| 473 |
ifeq (${GL_API}, Y) |
|---|
| 474 |
@${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/GL" \ |
|---|
| 475 |
LIBDIR="${_DBG_LIBDIR}" ${_DBG_LIBDIR}/${GL_LIB_DYNAMIC} |
|---|
| 476 |
endif |
|---|
| 477 |
ifeq (${PF_API}, Y) |
|---|
| 478 |
@${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/Pf" \ |
|---|
| 479 |
LIBDIR="${_DBG_LIBDIR}" ${_DBG_LIBDIR}/${PF_LIB_DYNAMIC} |
|---|
| 480 |
endif |
|---|
| 481 |
|
|---|
| 482 |
# Build the static libraries with the optimization flags enabled. |
|---|
| 483 |
_build_opt_lib_static: |
|---|
| 484 |
@echo "================================================" |
|---|
| 485 |
@echo "Building static optmized libraries" |
|---|
| 486 |
@echo "================================================" |
|---|
| 487 |
@${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}" LIBDIR=${_OPT_LIBDIR} \ |
|---|
| 488 |
${_OPT_LIBDIR}/${VJ_LIB_STATIC} |
|---|
| 489 |
ifeq (${GL_API}, Y) |
|---|
| 490 |
@${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/GL" \ |
|---|
| 491 |
LIBDIR=${_OPT_LIBDIR} ${_OPT_LIBDIR}/${GL_LIB_STATIC} |
|---|
| 492 |
endif |
|---|
| 493 |
ifeq (${PF_API}, Y) |
|---|
| 494 |
@${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/Pf" \ |
|---|
| 495 |
LIBDIR=${_OPT_LIBDIR} ${_OPT_LIBDIR}/${PF_LIB_STATIC} |
|---|
| 496 |
endif |
|---|
| 497 |
|
|---|
| 498 |
# Build the shared libraries with the optimization flags enabled. |
|---|
| 499 |
_build_opt_lib_shared: |
|---|
| 500 |
@echo "================================================" |
|---|
| 501 |
@echo "Building shared optmized libraries" |
|---|
| 502 |
@echo "================================================" |
|---|
| 503 |
@${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}" LIBDIR="${_OPT_LIBDIR}" \ |
|---|
| 504 |
${_OPT_LIBDIR}/${VJ_LIB_DYNAMIC} |
|---|
| 505 |
ifeq (${GL_API}, Y) |
|---|
| 506 |
@${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/GL" \ |
|---|
| 507 |
LIBDIR="${_OPT_LIBDIR}" ${_OPT_LIBDIR}/${GL_LIB_DYNAMIC} |
|---|
| 508 |
endif |
|---|
| 509 |
ifeq (${PF_API}, Y) |
|---|
| 510 |
@${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/Pf" \ |
|---|
| 511 |
LIBDIR="${_OPT_LIBDIR}" ${_OPT_LIBDIR}/${PF_LIB_DYNAMIC} |
|---|
| 512 |
endif |
|---|
| 513 |
|
|---|
| 514 |
# -------------------------------------------------------------------- |
|---|
| 515 |
# Build only the object files using the default values for ${OBJDIR}. |
|---|
| 516 |
# -------------------------------------------------------------------- |
|---|
| 517 |
obj: |
|---|
| 518 |
@echo "------------------------------------------------" |
|---|
| 519 |
@echo "Making library object files" |
|---|
| 520 |
@echo "------------------------------------------------" |
|---|
| 521 |
@${MAKE} RECTARGET="$@" recursive |
|---|
| 522 |
@echo "------------------------------------------------" |
|---|
| 523 |
@echo "Object files built" |
|---|
| 524 |
@echo "------------------------------------------------" |
|---|
| 525 |
|
|---|
| 526 |
# ----------------------------------------------- |
|---|
| 527 |
# Construct the static version of the libraries. |
|---|
| 528 |
# ----------------------------------------------- |
|---|
| 529 |
static-libs: ${VJ_LIB_STATIC} ${PF_LIB_STATIC} ${GL_LIB_STATIC} |
|---|
| 530 |
|
|---|
| 531 |
${LIBDIR}/${VJ_LIB_STATIC} ${LIBDIR}/${PF_LIB_STATIC} \ |
|---|
| 532 |
${LIBDIR}/${GL_LIB_STATIC}: ${OBJDIR}/*.o |
|---|
| 533 |
@echo "------------------------------------------------" |
|---|
| 534 |
@echo "Creating $@" |
|---|
| 535 |
@echo "------------------------------------------------" |
|---|
| 536 |
@/bin/sh ${scriptdir}/mkinstalldirs ${LIBDIR} |
|---|
| 537 |
${AR} $@ ${OBJDIR}/*.o |
|---|
| 538 |
cd ${_LIBDIR_BASE} && ln -sf $@ ./ |
|---|
| 539 |
@echo "------------------------------------------------" |
|---|
| 540 |
@echo "$@ done" |
|---|
| 541 |
@echo "------------------------------------------------" |
|---|
| 542 |
|
|---|
| 543 |
# ------------------------------------------------------- |
|---|
| 544 |
# Construct the dynamic shared version of the libraries. |
|---|
| 545 |
# ------------------------------------------------------- |
|---|
| 546 |
shared-libs: ${VJ_LIB_DYNAMIC} ${PF_LIB_DYNAMIC} ${GL_LIB_DYNAMIC} |
|---|
| 547 |
|
|---|
| 548 |
${LIBDIR}/${VJ_LIB_DYNAMIC} ${LIBDIR}/${PF_LIB_DYNAMIC} \ |
|---|
| 549 |
${LIBDIR}/${GL_LIB_DYNAMIC}: ${OBJDIR}/*.o |
|---|
| 550 |
@echo "------------------------------------------------" |
|---|
| 551 |
@echo "Creating $@" |
|---|
| 552 |
@echo "------------------------------------------------" |
|---|
| 553 |
@/bin/sh ${scriptdir}/mkinstalldirs ${LIBDIR} |
|---|
| 554 |
${LD} ${LDOPTS} -o $@ ${OBJDIR}/*.o |
|---|
| 555 |
cd ${_LIBDIR_BASE} && ln -sf $@ ./ |
|---|
| 556 |
@echo "------------------------------------------------" |
|---|
| 557 |
@echo "$@ done" |
|---|
| 558 |
@echo "------------------------------------------------" |
|---|
| 559 |
|
|---|
| 560 |
# ============================================================================= |
|---|
| 561 |
# Java-based configuration editor targets. |
|---|
| 562 |
# ============================================================================= |
|---|
| 563 |
|
|---|
| 564 |
# Build the Java-based configuration GUI. |
|---|
| 565 |
gui: |
|---|
| 566 |
ifndef NO_JAVA_GUI |
|---|
| 567 |
ifeq (${BUILD_GUI}, Y) |
|---|
| 568 |
@echo "------------------------------------------------" |
|---|
| 569 |
@echo "Building GUI" |
|---|
| 570 |
@echo "------------------------------------------------" |
|---|
| 571 |
@${MAKE} -C GUI all |
|---|
| 572 |
@echo "------------------------------------------------" |
|---|
| 573 |
@echo "GUI done" |
|---|
| 574 |
@echo "------------------------------------------------" |
|---|
| 575 |
else |
|---|
| 576 |
@echo "------------------------------------------------" |
|---|
| 577 |
@echo "GUI cannot be built without javac" |
|---|
| 578 |
@echo "------------------------------------------------" |
|---|
| 579 |
endif |
|---|
| 580 |
endif # ifndef NO_JAVA_GUI |
|---|
| 581 |
|
|---|
| 582 |
# ============================================================================= |
|---|
| 583 |
# Make links for developer use that provide the needed functionality for |
|---|
| 584 |
# the $VJ_BASE_DIR environment variable to be used when needed. $VJ_BASE_DIR |
|---|
| 585 |
# should be set to ${instlinks}. |
|---|
| 586 |
# ============================================================================= |
|---|
| 587 |
links: |
|---|
| 588 |
@echo "------------------------------------------------" |
|---|
| 589 |
@echo "Setting up developer installation links" |
|---|
| 590 |
@echo "------------------------------------------------" |
|---|
| 591 |
/bin/sh ${scriptdir}/mkinstalldirs ${instlinks} |
|---|
| 592 |
/bin/sh ${scriptdir}/mkinstalldirs ${instlinks}/include |
|---|
| 593 |
cd ${instlinks}/include && \ |
|---|
| 594 |
dir_list='${SUBDIRS}' ; \ |
|---|
| 595 |
for dir in $$dir_list ; do \ |
|---|
| 596 |
rm -f ./$$dir ; \ |
|---|
| 597 |
ln -s ${VJROOT_ABS}/$$dir ./$$dir ; \ |
|---|
| 598 |
done |
|---|
| 599 |
cd ${instlinks} && rm -f ./${_LIBDIR_NAME} && \ |
|---|
| 600 |
ln -s ${_LIBDIR_BASE} ./${_LIBDIR_NAME} |
|---|
| 601 |
cd ${instlinks} && rm -f ./Data && ln -s ${VJROOT_ABS}/Data ./Data |
|---|
| 602 |
cd ${instlinks}/include && ln -sf ${VJROOT_ABS}/vjConfig.h ./vjConfig.h |
|---|
| 603 |
cd ${instlinks}/include && ln -sf ${topdir}/vjDefines.h ./vjDefines.h |
|---|
| 604 |
/bin/sh ${scriptdir}/mkinstalldirs ${instlinks}/bin |
|---|
| 605 |
ifndef NO_JAVA_GUI |
|---|
| 606 |
cd ${instlinks}/bin && ln -sf ${topdir}/GUI/VjControl.jar ./ |
|---|
| 607 |
cd ${instlinks}/bin && ln -sf ${VJROOT_ABS}/GUI/vjcontrol ./vjcontrol |
|---|
| 608 |
cd ${instlinks}/bin && ln -sf ${VJROOT_ABS}/GUI/vjcontrol1.1 ./vjcontrol1.1 |
|---|
| 609 |
endif |
|---|
| 610 |
@echo "\n\n" |
|---|
| 611 |
@echo "---------------------------------------------------------------" |
|---|
| 612 |
@echo 'You should now set $$VJ_BASE_DIR to:' |
|---|
| 613 |
@cd ${instlinks} && echo " `pwd`" |
|---|
| 614 |
@echo "---------------------------------------------------------------" |
|---|
| 615 |
|
|---|
| 616 |
# Remove the links in ${instlinks}. |
|---|
| 617 |
clean-links: |
|---|
| 618 |
@echo "------------------------------------------------" |
|---|
| 619 |
@echo "Removing developer installation links" |
|---|
| 620 |
@echo "------------------------------------------------" |
|---|
| 621 |
rm -rf ${instlinks} |
|---|
| 622 |
|
|---|
| 623 |
# ============================================================================= |
|---|
| 624 |
# Installation targets. The default (what is done by 'install') is to install |
|---|
| 625 |
# the static debugging version of the libraries. The steps taken for a full |
|---|
| 626 |
# installation are: |
|---|
| 627 |
# |
|---|
| 628 |
# 1) Create the installation directory. |
|---|
| 629 |
# 2) Install the libraries. |
|---|
| 630 |
# 3) Install the header files. |
|---|
| 631 |
# 4) Install the test programs. |
|---|
| 632 |
# 5) Install the contents of the Data directory. |
|---|
| 633 |
# 6) Install the Java-based config editor (if possible). |
|---|
| 634 |
# ============================================================================= |
|---|
| 635 |
|
|---|
| 636 |
# Steps to take before beginning the installation process. This target is |
|---|
| 637 |
# independent of the current ABI. |
|---|
| 638 |
beforeinstall: |
|---|
| 639 |
/bin/sh ${scriptdir}/mkinstalldirs ${prefix} |
|---|
| 640 |
${MTREE_CMD} -Ude -f ${mtreedir}/VJ.install.dist -p ${prefix} |
|---|
| 641 |
|
|---|
| 642 |
# Steps to take after the installation process is complete. This target is |
|---|
| 643 |
# independent of the current ABI. |
|---|
| 644 |
afterinstall: |
|---|
| 645 |
@echo "===============================================================" |
|---|
| 646 |
@echo "VR Juggler installation complete" |
|---|
| 647 |
@echo "===============================================================" |
|---|
| 648 |
|
|---|
| 649 |
# ------------------------------------------------------------------------ |
|---|
| 650 |
# Do a full installation all versions of the libraries and the associated |
|---|
| 651 |
# files. |
|---|
| 652 |
# ------------------------------------------------------------------------ |
|---|
| 653 |
install-all installworld: |
|---|
| 654 |
@echo "===============================================================" |
|---|
| 655 |
@echo "Installing everything" |
|---|
| 656 |
@echo "===============================================================" |
|---|
| 657 |
@${MAKE} beforeinstall |
|---|
| 658 |
@${MAKE} _install_libs |
|---|
| 659 |
@${MAKE} _install_post_libs |
|---|
| 660 |
@${MAKE} afterinstall |
|---|
| 661 |
|
|---|
| 662 |
# ----------------------------------------------------------------------------- |
|---|
| 663 |
# Do a full installation of all versions of the libraries built in each of the |
|---|
| 664 |
# ABIs in ${ABI_LIST}. |
|---|
| 665 |
# ----------------------------------------------------------------------------- |
|---|
| 666 |
install-all-abi: |
|---|
| 667 |
@echo "===============================================================" |
|---|
| 668 |
@echo "Installing everything using all ABIs" |
|---|
| 669 |
@echo "===============================================================" |
|---|
| 670 |
@${MAKE} beforeinstall |
|---|
| 671 |
@abi_list='${ABI_LIST}' ; \ |
|---|
| 672 |
for abi in $$abi_list ; do \ |
|---|
| 673 |
echo "------------------------------------------------" ; \ |
|---|
| 674 |
echo "Installing $$abi version of libraries" ; \ |
|---|
| 675 |
echo "------------------------------------------------" ; \ |
|---|
| 676 |
${MAKE} vjABI=$$abi _install_libs ; \ |
|---|
| 677 |
done |
|---|
| 678 |
@${MAKE} _install_post_libs |
|---|
| 679 |
@${MAKE} afterinstall |
|---|
| 680 |
|
|---|
| 681 |
# Install all versions of the libraries (static optimized, shared optimized, |
|---|
| 682 |
# static debugging and shared debugging). The final step of this is to |
|---|
| 683 |
# make the syminks using the default value for ${_DEFAULT_DIR}. None of the |
|---|
| 684 |
# library installation targets are allowed to make their symlinks through |
|---|
| 685 |
# the use of the ${NOLINK} variable. |
|---|
| 686 |
_install_libs: |
|---|
| 687 |
@${MAKE} NOLINK=1 install-opt |
|---|
| 688 |
@${MAKE} NOLINK=1 install-dso |
|---|
| 689 |
@${MAKE} NOLINK=1 install-dbg |
|---|
| 690 |
@${MAKE} NOLINK=1 install-ddso |
|---|
| 691 |
@${MAKE} _install_lib_links |
|---|
| 692 |
|
|---|
| 693 |
# Do everything needed after installing the library binaries. |
|---|
| 694 |
_install_post_libs: |
|---|
| 695 |
@${MAKE} install-headers |
|---|
| 696 |
@${MAKE} install-test |
|---|
| 697 |
@${MAKE} install-data |
|---|
| 698 |
@${MAKE} install-gui |
|---|
| 699 |
|
|---|
| 700 |
# --------------------------------------------- |
|---|
| 701 |
# Install the debugging version of VR Juggler. |
|---|
| 702 |
# --------------------------------------------- |
|---|
| 703 |
install install-debug: |
|---|
| 704 |
@echo "===============================================================" |
|---|
| 705 |
@echo "Installing debugging version of VR Juggler" |
|---|
| 706 |
@echo "===============================================================" |
|---|
| 707 |
@${MAKE} beforeinstall |
|---|
| 708 |
@${MAKE} install-dbg |
|---|
| 709 |
@${MAKE} install-ddso |
|---|
| 710 |
@${MAKE} _install_post_libs |
|---|
| 711 |
@${MAKE} afterinstall |
|---|
| 712 |
|
|---|
| 713 |
# ------------------------------------------------------------ |
|---|
| 714 |
# Install only the static debugging version of the libraries. |
|---|
| 715 |
# ------------------------------------------------------------ |
|---|
| 716 |
install-dbg: |
|---|
| 717 |
@echo "------------------------------------------------" |
|---|
| 718 |
@echo "Installing static debugging libraries" |
|---|
| 719 |
@echo "------------------------------------------------" |
|---|
| 720 |
${MTREE_CMD} -Ude -p ${prefix} \ |
|---|
| 721 |
-f ${mtreedir_os}/VJ.lib${LIBBITSUF}${ISA}.dist |
|---|
| 722 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 723 |
${_DBG_LIBDIR}/${VJ_LIB_STATIC} ${_install_libdir_abs}/${_DEBUG_DIR}/ |
|---|
| 724 |
ifeq (${GL_API}, Y) |
|---|
| 725 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 726 |
${_DBG_LIBDIR}/${GL_LIB_STATIC} ${_install_libdir_abs}/${_DEBUG_DIR}/ |
|---|
| 727 |
endif |
|---|
| 728 |
ifeq (${PF_API}, Y) |
|---|
| 729 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 730 |
${_DBG_LIBDIR}/${PF_LIB_STATIC} ${_install_libdir_abs}/${_DEBUG_DIR}/ |
|---|
| 731 |
endif |
|---|
| 732 |
@${MAKE} _DEFAULT_DIR="${_DEBUG_DIR}" _install_lib_links |
|---|
| 733 |
|
|---|
| 734 |
# ------------------------------------------------------------- |
|---|
| 735 |
# Install only the dynamic debugging version of the libraries. |
|---|
| 736 |
# ------------------------------------------------------------- |
|---|
| 737 |
install-ddso: |
|---|
| 738 |
@echo "------------------------------------------------" |
|---|
| 739 |
@echo "Installing dynamic debugging libraries" |
|---|
| 740 |
@echo "------------------------------------------------" |
|---|
| 741 |
${MTREE_CMD} -Ude -p ${prefix} \ |
|---|
| 742 |
-f ${mtreedir_os}/VJ.lib${LIBBITSUF}${ISA}.dist |
|---|
| 743 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 744 |
${_DBG_LIBDIR}/${VJ_LIB_DYNAMIC} ${_install_libdir_abs}/${_DEBUG_DIR}/ |
|---|
| 745 |
ifeq (${GL_API}, Y) |
|---|
| 746 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 747 |
${_DBG_LIBDIR}/${GL_LIB_DYNAMIC} ${_install_libdir_abs}/${_DEBUG_DIR}/ |
|---|
| 748 |
endif |
|---|
| 749 |
ifeq (${PF_API}, Y) |
|---|
| 750 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 751 |
${_DBG_LIBDIR}/${PF_LIB_DYNAMIC} ${_install_libdir_abs}/${_DEBUG_DIR}/ |
|---|
| 752 |
endif |
|---|
| 753 |
@${MAKE} _DEFAULT_DIR="${_DEBUG_DIR}" _install_lib_links |
|---|
| 754 |
|
|---|
| 755 |
# ------------------------------------------------------------ |
|---|
| 756 |
# Install the optimized version of VR Juggler. |
|---|
| 757 |
# ------------------------------------------------------------ |
|---|
| 758 |
install-optim: |
|---|
| 759 |
@echo "===============================================================" |
|---|
| 760 |
@echo "Installing optimized version of VR Juggler" |
|---|
| 761 |
@echo "===============================================================" |
|---|
| 762 |
@${MAKE} beforeinstall |
|---|
| 763 |
@${MAKE} install-opt |
|---|
| 764 |
@${MAKE} install-dso |
|---|
| 765 |
@${MAKE} _install_post_libs |
|---|
| 766 |
@${MAKE} afterinstall |
|---|
| 767 |
|
|---|
| 768 |
# ------------------------------------------------------------ |
|---|
| 769 |
# Install only the static optimized version of the libraries. |
|---|
| 770 |
# ------------------------------------------------------------ |
|---|
| 771 |
install-opt: |
|---|
| 772 |
@echo "------------------------------------------------" |
|---|
| 773 |
@echo "Installing static optimized libraries" |
|---|
| 774 |
@echo "------------------------------------------------" |
|---|
| 775 |
${MTREE_CMD} -Ud -p ${prefix} \ |
|---|
| 776 |
-f ${mtreedir_os}/VJ.lib${LIBBITSUF}${ISA}.dist |
|---|
| 777 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 778 |
${_OPT_LIBDIR}/${VJ_LIB_STATIC} ${_install_libdir_abs}/${_OPT_DIR}/ |
|---|
| 779 |
ifeq (${GL_API}, Y) |
|---|
| 780 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 781 |
${_OPT_LIBDIR}/${GL_LIB_STATIC} ${_install_libdir_abs}/${_OPT_DIR}/ |
|---|
| 782 |
endif |
|---|
| 783 |
ifeq (${PF_API}, Y) |
|---|
| 784 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 785 |
${_OPT_LIBDIR}/${PF_LIB_STATIC} ${_install_libdir_abs}/${_OPT_DIR}/ |
|---|
| 786 |
endif |
|---|
| 787 |
@${MAKE} _DEFAULT_DIR="${_OPT_DIR}" _install_lib_links |
|---|
| 788 |
|
|---|
| 789 |
# ------------------------------------------------------------- |
|---|
| 790 |
# Install only the dynamic optimized version of the libraries. |
|---|
| 791 |
# ------------------------------------------------------------- |
|---|
| 792 |
install-dso: |
|---|
| 793 |
@echo "------------------------------------------------" |
|---|
| 794 |
@echo "Installing dynamic optimizied libraries" |
|---|
| 795 |
@echo "------------------------------------------------" |
|---|
| 796 |
${MTREE_CMD} -Ude -p ${prefix} \ |
|---|
| 797 |
-f ${mtreedir_os}/VJ.lib${LIBBITSUF}${ISA}.dist |
|---|
| 798 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 799 |
${_OPT_LIBDIR}/${VJ_LIB_DYNAMIC} ${_install_libdir_abs}/${_OPT_DIR}/ |
|---|
| 800 |
ifeq (${GL_API}, Y) |
|---|
| 801 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 802 |
${_OPT_LIBDIR}/${GL_LIB_DYNAMIC} ${_install_libdir_abs}/${_OPT_DIR}/ |
|---|
| 803 |
endif |
|---|
| 804 |
ifeq (${PF_API}, Y) |
|---|
| 805 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 806 |
${_OPT_LIBDIR}/${PF_LIB_DYNAMIC} ${_install_libdir_abs}/${_OPT_DIR}/ |
|---|
| 807 |
endif |
|---|
| 808 |
@${MAKE} _DEFAULT_DIR="${_OPT_DIR}" _install_lib_links |
|---|
| 809 |
|
|---|
| 810 |
# Install symlinks to the installed library binaries in the destination |
|---|
| 811 |
# directory. |
|---|
| 812 |
_install_lib_links: |
|---|
| 813 |
ifndef NOLINK |
|---|
| 814 |
@echo "------------------------------------------------" |
|---|
| 815 |
@echo "Creating symlinks in ${libdir}${LIBBITSUF}" |
|---|
| 816 |
@echo "------------------------------------------------" |
|---|
| 817 |
cd ${libdir}${LIBBITSUF} && umask ${_UMASK} && \ |
|---|
| 818 |
ln -sf ${_install_libdir_rel}/${_DEFAULT_DIR}/${VJ_LIB_STATIC} ./ |
|---|
| 819 |
cd ${libdir}${LIBBITSUF} && umask ${_UMASK} && \ |
|---|
| 820 |
ln -sf ${_install_libdir_rel}/${_DEFAULT_DIR}/${VJ_LIB_DYNAMIC} ./ |
|---|
| 821 |
ifeq (${GL_API}, Y) |
|---|
| 822 |
cd ${libdir}${LIBBITSUF} && umask ${_UMASK} && \ |
|---|
| 823 |
ln -sf ${_install_libdir_rel}/${_DEFAULT_DIR}/${GL_LIB_STATIC} ./ |
|---|
| 824 |
cd ${libdir}${LIBBITSUF} && umask ${_UMASK} && \ |
|---|
| 825 |
ln -sf ${_install_libdir_rel}/${_DEFAULT_DIR}/${GL_LIB_DYNAMIC} ./ |
|---|
| 826 |
endif |
|---|
| 827 |
ifeq (${PF_API}, Y) |
|---|
| 828 |
cd ${libdir}${LIBBITSUF} && umask ${_UMASK} && \ |
|---|
| 829 |
ln -sf ${_install_libdir_rel}/${_DEFAULT_DIR}/${PF_LIB_STATIC} ./ |
|---|
| 830 |
cd ${libdir}${LIBBITSUF} && umask ${_UMASK} && \ |
|---|
| 831 |
ln -sf ${_install_libdir_rel}/${_DEFAULT_DIR}/${PF_LIB_DYNAMIC} ./ |
|---|
| 832 |
endif |
|---|
| 833 |
@echo "------------------------------------------------" |
|---|
| 834 |
@echo "Creating symlinks in ${_install_libdir_abs}" |
|---|
| 835 |
@echo "------------------------------------------------" |
|---|
| 836 |
cd ${_install_libdir_abs} && umask ${_UMASK} && \ |
|---|
| 837 |
ln -sf ${_DEFAULT_DIR}/${VJ_LIB_STATIC} ./ |
|---|
| 838 |
cd ${_install_libdir_abs} && umask ${_UMASK} && \ |
|---|
| 839 |
ln -sf ${_DEFAULT_DIR}/${VJ_LIB_DYNAMIC} ./ |
|---|
| 840 |
ifeq (${GL_API}, Y) |
|---|
| 841 |
cd ${_install_libdir_abs} && umask ${_UMASK} && \ |
|---|
| 842 |
ln -sf ${_DEFAULT_DIR}/${GL_LIB_STATIC} ./ |
|---|
| 843 |
cd ${_install_libdir_abs} && umask ${_UMASK} && \ |
|---|
| 844 |
ln -sf ${_DEFAULT_DIR}/${GL_LIB_DYNAMIC} ./ |
|---|
| 845 |
endif |
|---|
| 846 |
ifeq (${PF_API}, Y) |
|---|
| 847 |
cd ${_install_libdir_abs} && umask ${_UMASK} && \ |
|---|
| 848 |
ln -sf ${_DEFAULT_DIR}/${PF_LIB_STATIC} ./ |
|---|
| 849 |
cd ${_install_libdir_abs} && umask ${_UMASK} && \ |
|---|
| 850 |
ln -sf ${_DEFAULT_DIR}/${PF_LIB_DYNAMIC} ./ |
|---|
| 851 |
endif |
|---|
| 852 |
endif # ifndef NOLINK |
|---|
| 853 |
|
|---|
| 854 |
# Install the header files. |
|---|
| 855 |
install-headers: |
|---|
| 856 |
@echo "------------------------------------------------" |
|---|
| 857 |
@echo "Installing header files" |
|---|
| 858 |
@echo "------------------------------------------------" |
|---|
| 859 |
${MTREE_CMD} -Ude -f ${mtreedir}/VJ.include.dist -p ${prefix} |
|---|
| 860 |
@${MAKE} RECTARGET="install" recursive |
|---|
| 861 |
@cat ${VJROOT_ABS}/vjConfig.h | \ |
|---|
| 862 |
sed -e 's/^#ifdef HAVE_CONFIG_H//' \ |
|---|
| 863 |
-e 's/^#endif..*HAVE_CONFIG_H.*$$//' >./vjConfig.tmp |
|---|
| 864 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 865 |
./vjConfig.tmp ${includedir}/vjConfig.h |
|---|
| 866 |
@-rm -f ./vjConfig.tmp |
|---|
| 867 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 868 |
${topdir}/vjDefines.h ${includedir} |
|---|
| 869 |
|
|---|
| 870 |
# Install the test programs. |
|---|
| 871 |
install-test: |
|---|
| 872 |
@echo "------------------------------------------------" |
|---|
| 873 |
@echo "Installing test programs" |
|---|
| 874 |
@echo "------------------------------------------------" |
|---|
| 875 |
${MTREE_CMD} -Ude -f ${mtreedir}/VJ.test.dist -p ${prefix} |
|---|
| 876 |
${PERL} ${scriptdir}/install-src.pl -i ${top_srcdir}/test \ |
|---|
| 877 |
-m ${_FILE_PERMS} -g ${_GROUP_NAME} -o ${prefix}/test |
|---|
| 878 |
${PERL} ${scriptdir}/makefiles-gen.pl --CXX="${CXX}" \ |
|---|
| 879 |
--DEFS="${DEFS}" --CPPFLAGS="${CPPFLAGS}" \ |
|---|
| 880 |
--CXXFLAGS="${CXXFLAGS}" --INCLUDES="@INCLUDES@" \ |
|---|
| 881 |
--startdir="${top_srcdir}/test" --SUBDIRS="${TEST_SUBDIRS}" \ |
|---|
| 882 |
--mode="${_FILE_PERMS}" --gname="${_GROUP_NAME}" --srcdir="." \ |
|---|
| 883 |
--prefix="${prefix}/test" \ |
|---|
| 884 |
--TEST_VJ_LIBS_BASIC='@TEST_VJ_LIBS_BASIC_SUBST@' \ |
|---|
| 885 |
--TEST_VJ_LIBS_GL='@TEST_VJ_LIBS_GL@' \ |
|---|
| 886 |
--TEST_VJ_LIBS_PF='@TEST_VJ_LIBS_PF@' \ |
|---|
| 887 |
--TEST_LIBS_BASIC='@TEST_LIBS_BASIC@' \ |
|---|
| 888 |
--TEST_EXTRA_LIBS_BASIC="@TEST_EXTRA_LIBS_BASIC_SUBST@" \ |
|---|
| 889 |
--TEST_EXTRA_LIBS_GL="@TEST_EXTRA_LIBS_GL_SUBST@" \ |
|---|
| 890 |
--TEST_EXTRA_LIBS_PF="@TEST_EXTRA_LIBS_PF@" |
|---|
| 891 |
|
|---|
| 892 |
# Install the standard data files. |
|---|
| 893 |
install-data: |
|---|
| 894 |
@echo "------------------------------------------------" |
|---|
| 895 |
@echo "Installing standard data files" |
|---|
| 896 |
@echo "------------------------------------------------" |
|---|
| 897 |
${MTREE_CMD} -Ude -f ${mtreedir}/VJ.data.dist -p ${prefix} |
|---|
| 898 |
${PERL} ${scriptdir}/install-dir.pl -i ${top_srcdir}/Data \ |
|---|
| 899 |
-m ${_FILE_PERMS} -g ${_GROUP_NAME} -o ${prefix}/Data |
|---|
| 900 |
|
|---|
| 901 |
# Install the Java-based config editor if possible. |
|---|
| 902 |
install-gui: |
|---|
| 903 |
ifndef NO_JAVA_GUI |
|---|
| 904 |
ifeq (${BUILD_GUI}, Y) |
|---|
| 905 |
@echo "------------------------------------------------" |
|---|
| 906 |
@echo "Installing vjcontrol" |
|---|
| 907 |
@echo "------------------------------------------------" |
|---|
| 908 |
swingpath=`${PERL} ${scriptdir}/find-swing.pl` ; \ |
|---|
| 909 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 910 |
$$swingpath ${bindir} |
|---|
| 911 |
${INSTALL} -m ${_FILE_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 912 |
${topdir}/GUI/VjControl.jar ${bindir} |
|---|
| 913 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 914 |
${VJROOT_ABS}/GUI/vjcontrol ${bindir}/vjcontrol |
|---|
| 915 |
${INSTALL} -m ${_EXEC_PERMS} -g ${_GROUP_NAME} \ |
|---|
| 916 |
${VJROOT_ABS}/GUI/vjcontrol1.1 ${bindir}/vjcontrol1.1 |
|---|
| 917 |
else |
|---|
| 918 |
@echo "------------------------------------------------" |
|---|
| 919 |
@echo "Skipping installation of vjcontrol (not built)" |
|---|
| 920 |
@echo "------------------------------------------------" |
|---|
| 921 |
endif |
|---|
| 922 |
endif # ifndef NO_JAVA_GUI |
|---|
| 923 |
|
|---|
| 924 |
# ============================================================================= |
|---|
| 925 |
# Clean-up targets. '_clean' removes all the files in the build directories. |
|---|
| 926 |
# '_cleandepend' removes all the dependency files (the .d makefiles) in the |
|---|
| 927 |
# build directories. 'clobber' removes the ${_BUILDDIR_BASE} and |
|---|
| 928 |
# ${_LIBDIR_NAME} directories. |
|---|
| 929 |
# ============================================================================= |
|---|
| 930 |
_clean: |
|---|
| 931 |
@echo "------------------------------------------------" |
|---|
|
|---|