| 1 |
# ************** <auto-copyright.pl BEGIN do not edit this line> ************** |
|---|
| 2 |
# |
|---|
| 3 |
# VR Juggler is (C) Copyright 1998-2007 by Iowa State University |
|---|
| 4 |
# |
|---|
| 5 |
# Original Authors: |
|---|
| 6 |
# Allen Bierbaum, Christopher Just, |
|---|
| 7 |
# Patrick Hartling, Kevin Meinert, |
|---|
| 8 |
# Carolina Cruz-Neira, Albert Baker |
|---|
| 9 |
# |
|---|
| 10 |
# This library is free software; you can redistribute it and/or |
|---|
| 11 |
# modify it under the terms of the GNU Library General Public |
|---|
| 12 |
# License as published by the Free Software Foundation; either |
|---|
| 13 |
# version 2 of the License, or (at your option) any later version. |
|---|
| 14 |
# |
|---|
| 15 |
# This library is distributed in the hope that it will be useful, |
|---|
| 16 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 18 |
# Library General Public License for more details. |
|---|
| 19 |
# |
|---|
| 20 |
# You should have received a copy of the GNU Library General Public |
|---|
| 21 |
# License along with this library; if not, write to the |
|---|
| 22 |
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|---|
| 23 |
# Boston, MA 02111-1307, USA. |
|---|
| 24 |
# |
|---|
| 25 |
# *************** <auto-copyright.pl END do not edit this line> *************** |
|---|
| 26 |
|
|---|
| 27 |
# ----------------------------------------------------------------------------- |
|---|
| 28 |
# Specialized include file for the top-level makefile. Targets and variables |
|---|
| 29 |
# needed for building the whole source tree are provided here. This file |
|---|
| 30 |
# should only be included by the top-level makefile. It is written in such a |
|---|
| 31 |
# way that no assumptions are made by this file about what the including file |
|---|
| 32 |
# provides except that it includes make.defs.mk. |
|---|
| 33 |
# |
|---|
| 34 |
# Generated for use on @PLATFORM@ |
|---|
| 35 |
# ----------------------------------------------------------------------------- |
|---|
| 36 |
|
|---|
| 37 |
# Variables whose values are specific to this file. |
|---|
| 38 |
data_subdir= @data_subdir@ |
|---|
| 39 |
includedir= @includedir@ |
|---|
| 40 |
instlinks= $(topdir)/instlinks |
|---|
| 41 |
srcdir= @srcdir@ |
|---|
| 42 |
top_srcdir= @top_srcdir@ |
|---|
| 43 |
JACORB_DIR= $(JUGGLERROOT_ABS)/external/JacORB |
|---|
| 44 |
|
|---|
| 45 |
# Extra compiler and linker options needed only by this file. |
|---|
| 46 |
DBG_FLAGS= -DJUGGLER_DEBUG @DBG_FLAGS@ |
|---|
| 47 |
OPT_FLAGS= -DJUGGLER_OPT -DNDEBUG @OPT_FLAGS@ |
|---|
| 48 |
|
|---|
| 49 |
# ============================================================================= |
|---|
| 50 |
# Build and installation directory naming and ownership information. |
|---|
| 51 |
# ============================================================================= |
|---|
| 52 |
DEFAULT_DIR= $(OPT_DIR) |
|---|
| 53 |
|
|---|
| 54 |
# If we have a name for the install group, define group-setting options for |
|---|
| 55 |
# UNIX commands (chown(1), chgrp(1)) and for local Perl scripts |
|---|
| 56 |
# (makefiles-gen.pl in particular). |
|---|
| 57 |
ifdef GROUP_NAME |
|---|
| 58 |
_GROUP_OPT_PL= --gname="$(GROUP_NAME)" |
|---|
| 59 |
endif |
|---|
| 60 |
|
|---|
| 61 |
# -------------------------------------------- |
|---|
| 62 |
# Library build information. |
|---|
| 63 |
# -------------------------------------------- |
|---|
| 64 |
|
|---|
| 65 |
LIBRARY_VERSION= @LIBRARY_VERSION@ |
|---|
| 66 |
|
|---|
| 67 |
# We will name static libs different dynamic libraries on Win32. |
|---|
| 68 |
ifeq (@OS_TYPE@, Win32) |
|---|
| 69 |
STATIC_SUFFIX= _s |
|---|
| 70 |
# On Win32, we need to export some symbols defined in the IDL-generated C++. |
|---|
| 71 |
LDOPTS+= /DEF:$(srcdir)/corba_exports.def |
|---|
| 72 |
endif |
|---|
| 73 |
|
|---|
| 74 |
ifeq (@HAVE_LD_SONAME@, Y) |
|---|
| 75 |
CC_SONAME_FLAG= @CC_SONAME_FLAG@ |
|---|
| 76 |
LDOPTS+= $(CC_SONAME_FLAG)$(notdir $@) |
|---|
| 77 |
endif |
|---|
| 78 |
|
|---|
| 79 |
# Add extra linking options on Darwin/OS X. |
|---|
| 80 |
ifeq (@PLATFORM@, Darwin) |
|---|
| 81 |
LDOPTS+= -Wl,-dylib_compatibility_version,$(MAJOR_VERSION).$(MINOR_VERSION) |
|---|
| 82 |
LDOPTS+= -Wl,-dylib_current_version,$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) |
|---|
| 83 |
LDOPTS_DBG= -g |
|---|
| 84 |
LDOPTS_OPT= -Wl,-x |
|---|
| 85 |
endif |
|---|
| 86 |
|
|---|
| 87 |
DYLIB_DEPS= @DYLIB_DEPS@ |
|---|
| 88 |
DYLIB_DEP_FILES= @DYLIB_DEP_FILES@ |
|---|
| 89 |
STATICLIB_EXT= @STATICLIB_EXT@ |
|---|
| 90 |
DYNAMICLIB_EXT= @DYNAMICLIB_EXT@ |
|---|
| 91 |
DYLIB_PROF_DEPS= @DYLIB_PROF_DEPS@ |
|---|
| 92 |
DYLIB_PROF_DEP_FILES= @DYLIB_PROF_DEP_FILES@ |
|---|
| 93 |
|
|---|
| 94 |
# These functions build up the name of the library using a comon form. |
|---|
| 95 |
# Unfortunately, spaces have significance in GNU Make function calls, so there |
|---|
| 96 |
# cannot be spaces after any commas. |
|---|
| 97 |
make_libname= $(1)$(2)$(LIBRARY_VERSION).$(3) |
|---|
| 98 |
make_static= $(call make_libname,$(1),$(STATIC_SUFFIX),$(STATICLIB_EXT)) |
|---|
| 99 |
make_dynamic= $(call make_libname,$(1),,$(DYNAMICLIB_EXT)) |
|---|
| 100 |
make_static_prof= $(call make_libname,$(1),$(PROFLIB_EXT)$(STATIC_SUFFIX),$(STATICLIB_EXT)) |
|---|
| 101 |
make_dynamic_prof= $(call make_libname,$(1),$(PROFLIB_EXT),$(DYNAMICLIB_EXT)) |
|---|
| 102 |
|
|---|
| 103 |
# Full list of the libraries to build. |
|---|
| 104 |
ifeq ($(BUILD_CXX), Y) |
|---|
| 105 |
LIBS= $(TWEEK_LIBRARY) |
|---|
| 106 |
STATIC_LIBS= $(call make_static,$${LIB}) |
|---|
| 107 |
DYNAMIC_LIBS= $(call make_dynamic,$${LIB}) |
|---|
| 108 |
PROF_STATIC_LIBS= $(call make_static_prof,$${LIB}) |
|---|
| 109 |
PROF_DYNAMIC_LIBS= $(call make_dynamic_prof,$${LIB}) |
|---|
| 110 |
endif |
|---|
| 111 |
|
|---|
| 112 |
# The proper library names. These are used below in the targets that actually |
|---|
| 113 |
# build the libraries. |
|---|
| 114 |
TWEEK_LIB_STATIC= $(call make_static,$(TWEEK_LIBRARY)) |
|---|
| 115 |
TWEEK_LIB_DYNAMIC= $(call make_dynamic,$(TWEEK_LIBRARY)) |
|---|
| 116 |
TWEEK_PROF_LIB_STATIC= $(call make_static_prof,$(TWEEK_LIBRARY)) |
|---|
| 117 |
TWEEK_PROF_LIB_DYNAMIC= $(call make_dynamic_prof,$(TWEEK_LIBRARY)) |
|---|
| 118 |
|
|---|
| 119 |
# Version information. |
|---|
| 120 |
PARAM_HEADER= tweek/tweekParam.h |
|---|
| 121 |
BRANCH= trunk |
|---|
| 122 |
CANON_NAME= Aule |
|---|
| 123 |
VER_ARGS= -f $(TWEEKROOT_ABS)/VERSION -s @VPR_SUBSYSTEM@ \ |
|---|
| 124 |
-b $(BRANCH) -n "$(CANON_NAME)" \ |
|---|
| 125 |
-d "`date '+%b %e, %Y %H:%M:%S'`" |
|---|
| 126 |
|
|---|
| 127 |
ifdef VERSION |
|---|
| 128 |
VER_ARGS+= -v $(VERSION) |
|---|
| 129 |
endif |
|---|
| 130 |
|
|---|
| 131 |
# ============================================================================= |
|---|
| 132 |
# Library targets. |
|---|
| 133 |
# ============================================================================= |
|---|
| 134 |
OBJS= $(OBJDIR)/*.$(OBJEXT) |
|---|
| 135 |
BEFOREBUILD= beforebuild |
|---|
| 136 |
AFTERBUILD= afterbuild |
|---|
| 137 |
|
|---|
| 138 |
# Things to do before the object files and library are built. |
|---|
| 139 |
beforebuild: |
|---|
| 140 |
@$(MAKE) $(PARAM_HEADER) |
|---|
| 141 |
@echo "------------------------------------------------" |
|---|
| 142 |
@echo "IDL code generation phase" |
|---|
| 143 |
@echo "------------------------------------------------" |
|---|
| 144 |
@$(MAKE) cxx-idl |
|---|
| 145 |
@$(MAKE) java-idl |
|---|
| 146 |
@$(MAKE) python-idl |
|---|
| 147 |
@$(MAKE) tweek-gui |
|---|
| 148 |
@$(MAKE) extensions-java |
|---|
| 149 |
|
|---|
| 150 |
$(PARAM_HEADER): $(TWEEKROOT_ABS)/$(PARAM_HEADER).in $(TWEEKROOT_ABS)/VERSION |
|---|
| 151 |
@$(MAKE) clean-version-links |
|---|
| 152 |
@$(SHELL) $(scriptdir)/make-ver.sh -o $@ \ |
|---|
| 153 |
-i $(TWEEKROOT_ABS)/$@.in $(VER_ARGS) |
|---|
| 154 |
|
|---|
| 155 |
cxx-idl: |
|---|
| 156 |
ifeq ($(BUILD_CXX), Y) |
|---|
| 157 |
@$(MAKE) RECTARGET="cxx_idl" DO_IDL=1 recursive |
|---|
| 158 |
endif |
|---|
| 159 |
|
|---|
| 160 |
java-idl: |
|---|
| 161 |
ifeq ($(BUILD_JAVA), Y) |
|---|
| 162 |
@$(MAKE) -C java DO_IDL=1 java_idl |
|---|
| 163 |
endif |
|---|
| 164 |
|
|---|
| 165 |
python-idl: |
|---|
| 166 |
ifeq ($(BUILD_PYTHON_IDL), Y) |
|---|
| 167 |
@$(MAKE) -C python DO_IDL=1 python_idl |
|---|
| 168 |
endif |
|---|
| 169 |
|
|---|
| 170 |
# Things to do after the object files and library are built. |
|---|
| 171 |
afterbuild: |
|---|
| 172 |
@$(MAKE) links |
|---|
| 173 |
@echo "" |
|---|
| 174 |
@echo "---------------------------------------------------------------" |
|---|
| 175 |
@echo 'You should now set $$TWEEK_BASE_DIR to:' |
|---|
| 176 |
@cd $(instlinks) && echo " `pwd`" |
|---|
| 177 |
@echo "---------------------------------------------------------------" |
|---|
| 178 |
|
|---|
| 179 |
# ----------------------------------------------- |
|---|
| 180 |
# Construct the static version of the libraries. |
|---|
| 181 |
# ----------------------------------------------- |
|---|
| 182 |
$(LIBDIR)/$(TWEEK_LIB_STATIC) $(LIBDIR)/$(TWEEK_PROF_LIB_STATIC): $(OBJS) |
|---|
| 183 |
ifneq ($(OS_TYPE), Win32) |
|---|
| 184 |
@echo "------------------------------------------------" |
|---|
| 185 |
@echo "Creating $@" |
|---|
| 186 |
@echo "------------------------------------------------" |
|---|
| 187 |
@$(SHELL) $(MKINSTALLDIRS) $(LIBDIR) |
|---|
| 188 |
$(AR) $(AR_NAME_FLAG)$@ $(OBJS) |
|---|
| 189 |
$(RANLIB) $@ |
|---|
| 190 |
cd $(LIBDIR_BASE) && $(RM_LN) $(notdir $@) && $(LN_S) $@ ./ |
|---|
| 191 |
@echo "------------------------------------------------" |
|---|
| 192 |
@echo "$@ done" |
|---|
| 193 |
@echo "------------------------------------------------" |
|---|
| 194 |
endif |
|---|
| 195 |
|
|---|
| 196 |
# ------------------------------------------------ |
|---|
| 197 |
# Construct the dynamic version of the libraries. |
|---|
| 198 |
# ------------------------------------------------ |
|---|
| 199 |
$(LIBDIR)/$(TWEEK_LIB_DYNAMIC): $(OBJS) $(DYLIB_DEP_FILES) |
|---|
| 200 |
@echo "------------------------------------------------" |
|---|
| 201 |
@echo "Creating $@" |
|---|
| 202 |
@echo "------------------------------------------------" |
|---|
| 203 |
@$(SHELL) $(MKINSTALLDIRS) $(LIBDIR) |
|---|
| 204 |
ifeq (@PLATFORM@, Darwin) |
|---|
| 205 |
ifeq ($(ISA), universal) |
|---|
| 206 |
for a in $(UNIVERSAL_ARCH_LIST) ; do \ |
|---|
| 207 |
ld -arch $$a -dynamic -r -d -bind_at_load -o \ |
|---|
| 208 |
$(subst .dylib,-$$a.lo,$@) $(OBJS) ; \ |
|---|
| 209 |
done |
|---|
| 210 |
lipo -create $(foreach arch,$(UNIVERSAL_ARCH_LIST),$(subst .dylib,-$(arch).lo,$@)) -output $(subst .dylib,.lo,$@) |
|---|
| 211 |
else |
|---|
| 212 |
ld -dynamic -r -d -bind_at_load -o $(subst .dylib,.lo,$@) $(OBJS) |
|---|
| 213 |
endif |
|---|
| 214 |
$(CXX) $(EXTRA_LDOPTS) -Wl,-dynamic -nostartfiles -Wl,-dylib \ |
|---|
| 215 |
-Wl,-ldylib1.o $(LDOPTS) -o $@ $(subst .dylib,.lo,$@) $(DYLIB_DEPS) |
|---|
| 216 |
rm -f $(@D)/*.lo |
|---|
| 217 |
else |
|---|
| 218 |
$(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJS) \ |
|---|
| 219 |
$(DYLIB_DEPS) |
|---|
| 220 |
endif |
|---|
| 221 |
ifeq (@OS_TYPE@, Win32) |
|---|
| 222 |
cd $(LIBDIR_BASE) && cp $(LIBDIR)/* . |
|---|
| 223 |
else |
|---|
| 224 |
cd $(LIBDIR_BASE) && $(RM_LN) $(notdir $@) && $(LN_S) $@ ./ |
|---|
| 225 |
endif |
|---|
| 226 |
@echo "------------------------------------------------" |
|---|
| 227 |
@echo "$@ done" |
|---|
| 228 |
@echo "------------------------------------------------" |
|---|
| 229 |
|
|---|
| 230 |
# --------------------------------------------------------- |
|---|
| 231 |
# Construct the profiled dynamic version of the libraries. |
|---|
| 232 |
# --------------------------------------------------------- |
|---|
| 233 |
$(LIBDIR)/$(TWEEK_PROF_LIB_DYNAMIC): $(OBJS) $(DYLIB_PROF_DEP_FILES) |
|---|
| 234 |
@echo "------------------------------------------------" |
|---|
| 235 |
@echo "Creating $@" |
|---|
| 236 |
@echo "------------------------------------------------" |
|---|
| 237 |
@$(SHELL) $(MKINSTALLDIRS) $(LIBDIR) |
|---|
| 238 |
ifeq (@PLATFORM@, Darwin) |
|---|
| 239 |
ifeq ($(ISA), universal) |
|---|
| 240 |
for a in $(UNIVERSAL_ARCH_LIST) ; do \ |
|---|
| 241 |
ld -arch $$a -dynamic -r -d -bind_at_load -o \ |
|---|
| 242 |
$(subst .dylib,-$$a.lo,$@) $(OBJS) ; \ |
|---|
| 243 |
done |
|---|
| 244 |
lipo -create $(foreach arch,$(UNIVERSAL_ARCH_LIST),$(subst .dylib,-$(arch).lo,$@)) -output $(subst .dylib,.lo,$@) |
|---|
| 245 |
else |
|---|
| 246 |
ld -dynamic -r -d -bind_at_load -o $(subst .dylib,.lo,$@) $(OBJS) |
|---|
| 247 |
endif |
|---|
| 248 |
$(CXX) $(EXTRA_LDOPTS) -Wl,-dynamic -nostartfiles -Wl,-dylib \ |
|---|
| 249 |
-Wl,-ldylib1.o $(LDOPTS) -o $@ $(subst .dylib,.lo,$@) \ |
|---|
| 250 |
$(DYLIB_PROF_DEPS) |
|---|
| 251 |
rm -f $(@D)/*.lo |
|---|
| 252 |
else |
|---|
| 253 |
$(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJS) \ |
|---|
| 254 |
$(DYLIB_PROF_DEPS) |
|---|
| 255 |
endif |
|---|
| 256 |
ifeq (@OS_TYPE@, Win32) |
|---|
| 257 |
cd $(LIBDIR_BASE) && cp $(LIBDIR)/* . |
|---|
| 258 |
else |
|---|
| 259 |
cd $(LIBDIR_BASE) && $(RM_LN) $(notdir $@) && $(LN_S) $@ ./ |
|---|
| 260 |
endif |
|---|
| 261 |
@echo "------------------------------------------------" |
|---|
| 262 |
@echo "$@ done" |
|---|
| 263 |
@echo "------------------------------------------------" |
|---|
| 264 |
|
|---|
| 265 |
# ============================================================================= |
|---|
| 266 |
# Tweek GUI targets. |
|---|
| 267 |
# ============================================================================= |
|---|
| 268 |
|
|---|
| 269 |
# Build the Tweek GUI code base and the JAR files. |
|---|
| 270 |
tweek-gui: |
|---|
| 271 |
@$(MAKE) tweek-java |
|---|
| 272 |
@$(MAKE) tweek-python |
|---|
| 273 |
|
|---|
| 274 |
# Build the Java-based GUI, associated code, and the JAR files. |
|---|
| 275 |
tweek-java: |
|---|
| 276 |
ifndef NO_JAVA |
|---|
| 277 |
ifeq ($(BUILD_JAVA), Y) |
|---|
| 278 |
@echo "===> java" |
|---|
| 279 |
@$(MAKE) -C java $@ |
|---|
| 280 |
@echo "<=== java" |
|---|
| 281 |
else |
|---|
| 282 |
@echo "------------------------------------------------" |
|---|
| 283 |
@echo "Tweek Java GUI build skipped" |
|---|
| 284 |
@echo "------------------------------------------------" |
|---|
| 285 |
endif |
|---|
| 286 |
endif # ifndef NO_JAVA |
|---|
| 287 |
|
|---|
| 288 |
# Build the Tweek extensions and the JAR files |
|---|
| 289 |
extensions-gui: |
|---|
| 290 |
@$(MAKE) extensions-java |
|---|
| 291 |
|
|---|
| 292 |
# Build the extensions and their JAR files |
|---|
| 293 |
extensions-java: |
|---|
| 294 |
ifndef NO_JAVA |
|---|
| 295 |
ifeq ($(BUILD_JAVA), Y) |
|---|
| 296 |
@echo "===> extensions/java" |
|---|
| 297 |
@$(MAKE) -C extensions/java $@ |
|---|
| 298 |
@echo "<=== extensions/java" |
|---|
| 299 |
else |
|---|
| 300 |
@echo "------------------------------------------------" |
|---|
| 301 |
@echo "Tweek Extensions build skipped" |
|---|
| 302 |
@echo "------------------------------------------------" |
|---|
| 303 |
endif |
|---|
| 304 |
endif # ifndef NO_JAVA |
|---|
| 305 |
|
|---|
| 306 |
tweek-python: |
|---|
| 307 |
ifeq ($(BUILD_PYTHON_GUI), Y) |
|---|
| 308 |
@echo "===> python" |
|---|
| 309 |
@$(MAKE) -C python $@ |
|---|
| 310 |
@echo "<=== python" |
|---|
| 311 |
else |
|---|
| 312 |
@echo "------------------------------------------------" |
|---|
| 313 |
@echo "Tweek Python GUI build skipped" |
|---|
| 314 |
@echo "------------------------------------------------" |
|---|
| 315 |
endif |
|---|
| 316 |
|
|---|
| 317 |
# ============================================================================= |
|---|
| 318 |
# Make links for developer use that provide the needed functionality for |
|---|
| 319 |
# the $TWEEK_BASE_DIR environment variable to be used when needed. |
|---|
| 320 |
# $TWEEK_BASE_DIR should be set to $(instlinks). |
|---|
| 321 |
# ============================================================================= |
|---|
| 322 |
links: |
|---|
| 323 |
@echo "------------------------------------------------" |
|---|
| 324 |
@echo "Setting up developer installation" |
|---|
| 325 |
@echo "------------------------------------------------" |
|---|
| 326 |
$(SHELL) $(MKINSTALLDIRS) $(instlinks)/share/flagpoll |
|---|
| 327 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 328 |
$(EXTRA_INSTALL_ARGS) $(topdir)/tweek.fpc \ |
|---|
| 329 |
$(instlinks)/share/flagpoll/tweek.fpc |
|---|
| 330 |
ifndef NO_JAVA |
|---|
| 331 |
ifeq ($(BUILD_JAVA), Y) |
|---|
| 332 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 333 |
$(EXTRA_INSTALL_ARGS) $(topdir)/tweek-java.fpc \ |
|---|
| 334 |
$(instlinks)/share/flagpoll/tweek-java.fpc |
|---|
| 335 |
endif |
|---|
| 336 |
endif |
|---|
| 337 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 338 |
$(EXTRA_INSTALL_ARGS) $(topdir)/tweek-python.fpc \ |
|---|
| 339 |
$(instlinks)/share/flagpoll/tweek-python.fpc |
|---|
| 340 |
ifdef BUILD_TYPE |
|---|
| 341 |
$(MAKE) links-$(BUILD_TYPE) |
|---|
| 342 |
else |
|---|
| 343 |
$(MAKE) links-dbg |
|---|
| 344 |
endif |
|---|
| 345 |
|
|---|
| 346 |
clean-version-links: |
|---|
| 347 |
@rm -rf $(LIBDIR_BASE) |
|---|
| 348 |
@rm -rf $(instlinks)/include/tweek* $(instlinks)/$(data_subdir)/tweek* |
|---|
| 349 |
@rm -f $(instlinks)/lib$(LIBBITSUF)/flagpoll/tweek* |
|---|
| 350 |
@for l in $(LIBS) ; do \ |
|---|
| 351 |
find $(instlinks) -name "$$l*" -exec rm {} ';' ; \ |
|---|
| 352 |
done |
|---|
| 353 |
|
|---|
| 354 |
links-all: |
|---|
| 355 |
@$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" installworld |
|---|
| 356 |
|
|---|
| 357 |
links-dbg: |
|---|
| 358 |
@$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-debug |
|---|
| 359 |
|
|---|
| 360 |
links-opt: |
|---|
| 361 |
@$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-optim |
|---|
| 362 |
|
|---|
| 363 |
links-prof: |
|---|
| 364 |
@$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-profiled |
|---|
| 365 |
|
|---|
| 366 |
links-prof-libs: |
|---|
| 367 |
@$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-prof |
|---|
| 368 |
@$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-prof-dso |
|---|
| 369 |
|
|---|
| 370 |
# Remove the links in $(instlinks). |
|---|
| 371 |
clean-links: |
|---|
| 372 |
ifndef GLOBAL_BUILD |
|---|
| 373 |
@echo "------------------------------------------------" |
|---|
| 374 |
@echo "Removing developer installation links" |
|---|
| 375 |
@echo "------------------------------------------------" |
|---|
| 376 |
rm -rf $(instlinks) |
|---|
| 377 |
endif |
|---|
| 378 |
|
|---|
| 379 |
# ============================================================================= |
|---|
| 380 |
# Installation targets. The default (what is done by 'install') is to install |
|---|
| 381 |
# the static debugging version of the libraries. The steps taken for a full |
|---|
| 382 |
# installation are: |
|---|
| 383 |
# |
|---|
| 384 |
# 1) Create the full installation directory hierarchy. |
|---|
| 385 |
# 2) Install the libraries. |
|---|
| 386 |
# 3) Install the header files. |
|---|
| 387 |
# 4) Install the test programs. |
|---|
| 388 |
# 5) Install the contents of the Data directory. |
|---|
| 389 |
# 6) Install the Java-based config editor (if possible). |
|---|
| 390 |
# ============================================================================= |
|---|
| 391 |
|
|---|
| 392 |
BEFOREINSTALL= beforeinstall |
|---|
| 393 |
AFTERINSTALL= afterinstall |
|---|
| 394 |
|
|---|
| 395 |
# Steps to take before beginning the installation process. This target is |
|---|
| 396 |
# independent of the current ABI. |
|---|
| 397 |
beforeinstall: |
|---|
| 398 |
@$(MAKE) hier |
|---|
| 399 |
|
|---|
| 400 |
# Make the full directory hierarchy for the installation. |
|---|
| 401 |
hier: |
|---|
| 402 |
@echo "------------------------------------------------" |
|---|
| 403 |
@echo "Making hierarchy" |
|---|
| 404 |
@echo "------------------------------------------------" |
|---|
| 405 |
$(SHELL) $(MKINSTALLDIRS) $(prefix) |
|---|
| 406 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.install.dist -p $(prefix) |
|---|
| 407 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.include.dist -p $(prefix) |
|---|
| 408 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.lib.dist -p $(prefix) |
|---|
| 409 |
$(SHELL) $(MKINSTALLDIRS) $(projdatadir) |
|---|
| 410 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.java.dist -p $(projdatadir) |
|---|
| 411 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.test.dist -p $(projdatadir) |
|---|
| 412 |
|
|---|
| 413 |
# Steps to take after the installation process is complete. This target is |
|---|
| 414 |
# independent of the current ABI. |
|---|
| 415 |
afterinstall: |
|---|
| 416 |
@echo "===============================================================" |
|---|
| 417 |
@echo "Tweek installation complete" |
|---|
| 418 |
@echo "===============================================================" |
|---|
| 419 |
|
|---|
| 420 |
PREINSTALL= pre-install |
|---|
| 421 |
POSTINSTALL= post-install |
|---|
| 422 |
|
|---|
| 423 |
pre-install: |
|---|
| 424 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.lib.dist -p $(prefix) |
|---|
| 425 |
|
|---|
| 426 |
# Do everything needed after installing the library binaries. |
|---|
| 427 |
post-install: |
|---|
| 428 |
@$(MAKE) install-tweek-gui |
|---|
| 429 |
@$(MAKE) install-test |
|---|
| 430 |
@$(MAKE) install-data |
|---|
| 431 |
@$(MAKE) install-m4 |
|---|
| 432 |
@$(MAKE) install-flagpoll |
|---|
| 433 |
@$(MAKE) install-java-idl |
|---|
| 434 |
|
|---|
| 435 |
install-java-idl: |
|---|
| 436 |
ifeq ($(BUILD_JAVA), Y) |
|---|
| 437 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 438 |
$(EXTRA_INSTALL_ARGS) $(JACORB_DIR)/LICENSE $(projdatadir) |
|---|
| 439 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 440 |
$(EXTRA_INSTALL_ARGS) $(JACORB_DIR)/README.source $(projdatadir) |
|---|
| 441 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 442 |
$(EXTRA_INSTALL_ARGS) $(JACORB_DIR)/idl.jar $(bindir) |
|---|
| 443 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 444 |
$(EXTRA_INSTALL_ARGS) $(JACORB_DIR)/logkit-1.2.jar $(bindir) |
|---|
| 445 |
ifeq (@OS_TYPE@, Win32) |
|---|
| 446 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 447 |
$(JACORB_DIR)/idl.bat $(bindir) |
|---|
| 448 |
endif |
|---|
| 449 |
$(INSTALL) -m $(EXEC_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 450 |
$(EXTRA_INSTALL_ARGS) $(JACORB_DIR)/idl $(bindir) |
|---|
| 451 |
endif |
|---|
| 452 |
|
|---|
| 453 |
install-flagpoll: |
|---|
| 454 |
@echo "------------------------------------------------" |
|---|
| 455 |
@echo "Installing Flagpoll metadata file" |
|---|
| 456 |
@echo "------------------------------------------------" |
|---|
| 457 |
$(SHELL) $(MKINSTALLDIRS) $(libdir)$(LIBBITSUF)/flagpoll |
|---|
| 458 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 459 |
$(topdir)/tweek.fpc \ |
|---|
| 460 |
$(libdir)$(LIBBITSUF)/flagpoll/tweek-$(VERSION_DOT).$(PLATFORM).$(ISA).fpc |
|---|
| 461 |
ifndef NO_JAVA |
|---|
| 462 |
ifeq ($(BUILD_JAVA), Y) |
|---|
| 463 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 464 |
$(topdir)/tweek-java.fpc \ |
|---|
| 465 |
$(libdir)$(LIBBITSUF)/flagpoll/tweek-java-$(VERSION_DOT).$(PLATFORM).noarch.fpc |
|---|
| 466 |
endif |
|---|
| 467 |
endif |
|---|
| 468 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 469 |
$(topdir)/tweek-python.fpc \ |
|---|
| 470 |
$(libdir)$(LIBBITSUF)/flagpoll/tweek-python-$(VERSION_DOT).$(PLATFORM).noarch.fpc |
|---|
| 471 |
|
|---|
| 472 |
PREINSTALL_HEADERS= pre-install-headers |
|---|
| 473 |
|
|---|
| 474 |
# If the C++ API is not available, install the IDL files anyway. The Java |
|---|
| 475 |
# API needs them. |
|---|
| 476 |
ifneq ($(BUILD_CXX), Y) |
|---|
| 477 |
POSTINSTALL_HEADERS= post-install-headers-idl |
|---|
| 478 |
endif |
|---|
| 479 |
|
|---|
| 480 |
pre-install-headers: |
|---|
| 481 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.include.dist -p $(prefix) |
|---|
| 482 |
|
|---|
| 483 |
# Install only the .idl files in tweek/idl. |
|---|
| 484 |
post-install-headers-idl: |
|---|
| 485 |
$(MAKE) -C tweek/idl install |
|---|
| 486 |
|
|---|
| 487 |
# Install the Java- and Python-based software if possible. |
|---|
| 488 |
install-tweek-gui: |
|---|
| 489 |
ifdef NO_JAVA |
|---|
| 490 |
@echo "------------------------------------------------" |
|---|
| 491 |
@echo "Skipping Tweek GUI installation (not built)" |
|---|
| 492 |
@echo "------------------------------------------------" |
|---|
| 493 |
else |
|---|
| 494 |
ifeq ($(BUILD_JAVA), Y) |
|---|
| 495 |
@$(MAKE) -C java tweek-gui-install |
|---|
| 496 |
ifeq ($(BUILD_EXTENSIONS), Y) |
|---|
| 497 |
@$(MAKE) -C extensions/java extensions-gui-install |
|---|
| 498 |
endif # if $(BUILD_EXTENSIONS) == Y |
|---|
| 499 |
endif # if $(BUILD_JAVA) == Y |
|---|
| 500 |
endif # ifdef NO_JAVA |
|---|
| 501 |
ifeq ($(BUILD_PYTHON_IDL), Y) |
|---|
| 502 |
@$(MAKE) -C python tweek-idl-install |
|---|
| 503 |
endif |
|---|
| 504 |
ifeq ($(BUILD_PYTHON_GUI), Y) |
|---|
| 505 |
@$(MAKE) -C python tweek-gui-install |
|---|
| 506 |
endif |
|---|
| 507 |
|
|---|
| 508 |
install-data: |
|---|
| 509 |
@echo "------------------------------------------------" |
|---|
| 510 |
@echo "Installing standard data files" |
|---|
| 511 |
@echo "------------------------------------------------" |
|---|
| 512 |
$(SHELL) $(MKINSTALLDIRS) $(projdatadir) |
|---|
| 513 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.data.dist -p $(projdatadir) |
|---|
| 514 |
$(PERL) $(scriptdir)/install-dir.pl -i $(top_srcdir)/data \ |
|---|
| 515 |
-m $(FILE_PERMS) $(GROUP_OPT_UNIX) -o $(projdatadir)/data \ |
|---|
| 516 |
-v "$(topdir)/VARS.pl" $(EXTRA_INSTALL_ARGS) |
|---|
| 517 |
$(PERL) $(scriptdir)/makefiles-gen.pl --mode="$(FILE_PERMS)" \ |
|---|
| 518 |
--prefix="$(projdatadir)" --vars="$(topdir)/VARS.pl" \ |
|---|
| 519 |
--files="$(top_srcdir)/tweek.appdefs.mk.in" $(_GROUP_OPT_PL) \ |
|---|
| 520 |
--srcdir="." |
|---|
| 521 |
|
|---|
| 522 |
# Install the test programs. |
|---|
| 523 |
install-test: |
|---|
| 524 |
@echo "------------------------------------------------" |
|---|
| 525 |
@echo "Installing test programs" |
|---|
| 526 |
@echo "------------------------------------------------" |
|---|
| 527 |
$(SHELL) $(MKINSTALLDIRS) $(projdatadir) |
|---|
| 528 |
$(MTREE_CMD) -Ude -f $(mtreedir)/TWEEK.test.dist -p $(projdatadir) |
|---|
| 529 |
$(PERL) $(scriptdir)/install-src.pl -i $(top_srcdir)/test \ |
|---|
| 530 |
-m $(FILE_PERMS) $(GROUP_OPT_UNIX) -o $(projdatadir)/test \ |
|---|
| 531 |
-e ".jpx,.xml,.MF" |
|---|
| 532 |
$(PERL) $(scriptdir)/makefiles-gen.pl --mode="$(FILE_PERMS)" \ |
|---|
| 533 |
--prefix="$(projdatadir)/test" --vars="$(topdir)/VARS.pl" \ |
|---|
| 534 |
--startdir="$(top_srcdir)/test" $(_GROUP_OPT_PL) --srcdir="." |
|---|
| 535 |
|
|---|
| 536 |
install-m4: |
|---|
| 537 |
@echo "------------------------------------------------" |
|---|
| 538 |
@echo "Installing Autoconf m4 macros" |
|---|
| 539 |
@echo "------------------------------------------------" |
|---|
| 540 |
$(SHELL) $(MKINSTALLDIRS) $(datadir)/aclocal |
|---|
| 541 |
$(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX) \ |
|---|
| 542 |
$(EXTRA_INSTALL_ARGS) $(JUGGLERROOT_ABS)/macros/tweek.m4 \ |
|---|
| 543 |
$(datadir)/aclocal |
|---|
| 544 |
|
|---|
| 545 |
# ============================================================================= |
|---|
| 546 |
# Clean-up targets. '_clobber' removes the developer installation links. |
|---|
| 547 |
# ============================================================================= |
|---|
| 548 |
_clobber: |
|---|
| 549 |
@$(MAKE) cleandepend |
|---|
| 550 |
@$(MAKE) clean-links |
|---|
| 551 |
|
|---|
| 552 |
# Define $(_LOCAL_CLOBBER) to inform the shared 'clobber' target that there is |
|---|
| 553 |
# a '_clobber' target to be run besides the standard targets. |
|---|
| 554 |
_LOCAL_CLOBBER= 1 |
|---|
| 555 |
|
|---|
| 556 |
include $(MKPATH)/dpp.libs.mk |
|---|
| 557 |
include $(MKPATH)/dpp.clean.mk |
|---|
| 558 |
|
|---|
| 559 |
CLEAN_FILES+= $(PARAM_HEADER) |
|---|
| 560 |
CLEAN_DIRS+= $(BUILDDIR_BASE) $(LIBDIR_NAME) |
|---|
| 561 |
CLOBBER_DIRS+= $(BUILDDIR_BASE) $(LIBDIR_NAME) |
|---|