summaryrefslogtreecommitdiff
path: root/include/makeinclude
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-01-07 23:28:11 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-01-07 23:28:11 +0000
commit327cd2d49ac9fa52b22f6f9d2c24407e70de0f1c (patch)
tree21ba9ead95f8949fa28c38e7f7fc68504fb625c3 /include/makeinclude
parent8fd8b217b40ea6db2859be2406164fb526a77e9f (diff)
downloadATCD-327cd2d49ac9fa52b22f6f9d2c24407e70de0f1c.tar.gz
ChangeLogTag:Wed Jan 7 23:06:57 UTC 2004 Don Hinton <dhinton@dre.vanderbilt.edu>
Diffstat (limited to 'include/makeinclude')
-rw-r--r--include/makeinclude/all_in_one.GNU20
-rw-r--r--include/makeinclude/platform_g++_common.GNU59
-rw-r--r--include/makeinclude/platform_linux.GNU36
-rw-r--r--include/makeinclude/rules.bin.GNU12
-rw-r--r--include/makeinclude/rules.lib.GNU30
-rw-r--r--include/makeinclude/rules.local.GNU70
-rw-r--r--include/makeinclude/rules.nested.GNU20
-rw-r--r--include/makeinclude/wrapper_macros.GNU273
8 files changed, 156 insertions, 364 deletions
diff --git a/include/makeinclude/all_in_one.GNU b/include/makeinclude/all_in_one.GNU
index cf0da1f537a..ceb3890b30d 100644
--- a/include/makeinclude/all_in_one.GNU
+++ b/include/makeinclude/all_in_one.GNU
@@ -11,9 +11,7 @@ ALL_IN_ONE_GNU = 1
# Include wrapper macros to all user defines, etc.
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif
+TAO_ROOT ?= $(ACE_ROOT)/TAO
ifneq ($(ADDITIONAL_INCLUDE),)
include $(ADDITIONAL_INCLUDE)
@@ -29,22 +27,16 @@ include $(ACE_ROOT)/include/makeinclude/component_check.GNU
# If no required components are missing, set the real targets
ifeq ($(MISSING_COMPONENTS),)
ifdef BIN_UNCHECKED
- ifndef BIN
- BIN = $(BIN_UNCHECKED)
- endif # !BIN
+ BIN += $(BIN_UNCHECKED)
endif # !BIN_UNCHECKED
ifdef static_libs
ifdef LIB_UNCHECKED
- ifndef LIB
- LIB = $(LIB_UNCHECKED)
- endif # !LIB
+ LIB += $(LIB_UNCHECKED)
endif # !LIB_UNCHECKED
endif # static_libs
ifdef shared_libs
ifdef SHLIB_UNCHECKED
- ifndef SHLIB
- SHLIB = $(SHLIB_UNCHECKED)
- endif # !SHLIB
+ SHLIB += $(SHLIB_UNCHECKED)
endif # !SHLIB_UNCHECKED
endif # !shared_libs
endif # COMPILE_COMPONENT
@@ -76,9 +68,7 @@ endif # BIN
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
# Remove the -g option if requested.
-ifndef SUPPRESS_DASH_G
- SUPPRESS_DASH_G ?=
-endif
+SUPPRESS_DASH_G ?=
ifeq ($(SUPPRESS_DASH_G),1)
DCFLAGS := $(filter-out -g, $DCFLAGS)
endif
diff --git a/include/makeinclude/platform_g++_common.GNU b/include/makeinclude/platform_g++_common.GNU
index 047c8d6e158..065f7c4c8c5 100644
--- a/include/makeinclude/platform_g++_common.GNU
+++ b/include/makeinclude/platform_g++_common.GNU
@@ -1,3 +1,4 @@
+# -*- Makefile -*-
# $Id$
#
# Common file help turn on/off explicit template instantiation
@@ -46,12 +47,8 @@ endif
# The correct flags to pass to the linker for ELF dynamic shared library
# versioning. None of this works on OpenBSD's ld.
# If the platform file didn't already set versioned_so, default to 1.
-ifndef versioned_so
- versioned_so = 1
-endif
-ifndef with_ld
- with_ld ?=
-endif
+versioned_so ?= 1
+with_ld ?=
ifeq ($(versioned_so),1)
ifeq ($(with_ld),hpux)
SOFLAGS += -Wl,+h -Wl,$(SONAME)
@@ -67,36 +64,34 @@ ifeq ($(versioned_so),1)
endif
endif
-ifndef static_libs_only
- static_libs_only ?=
-endif
+static_libs_only ?=
+
+# Only modify LDFLAGS if DLD has been set.
+ifneq ($(DLD),)
+ ifeq ($(DLD),$(CXX_FOR_VERSION_TEST)) # only try this is we are using ld through gcc
+ LD_FOR_VERSION_TEST = $(shell $(CXX_FOR_VERSION_TEST) -print-prog-name=ld)
+ else
+ LD_FOR_VERSION_TEST = $(DLD)
+ endif # DLD = CXX_FOR_VERSION_TEST
+ # The -E option is GNU ld specific
+ GNU_LD := $(shell sh -c '$(LD_FOR_VERSION_TEST) -v 2>&1 | grep -c "GNU ld"')
+endif # DLD
+
+STATIC_LINK_FLAG ?=
+ifeq ($(GNU_LD),1)
+ STATIC_LINK_FLAG = -static
+endif # GNU_LD
# Add all symbols to the dynamic symbol table. Needed to enable dynamic_cast
# for shared libraries. (see http://gcc.gnu.org/faq.html#dso)
ifeq ($(shared_libs), 1)
ifneq ($(static_libs_only), 1)
-
- # Only modify LDFLAGS if DLD has been set.
- ifneq ($(DLD),)
- ifeq ($(DLD),$(CXX_FOR_VERSION_TEST)) # only try this is we are using ld through gcc
- LD_FOR_VERSION_TEST = $(shell $(CXX_FOR_VERSION_TEST) -print-prog-name=ld)
- else
- LD_FOR_VERSION_TEST = $(DLD)
- endif # DLD = CXX_FOR_VERSION_TEST
-
- # The -E option is GNU ld specific
- GNU_LD := $(shell sh -c '$(LD_FOR_VERSION_TEST) -v 2>&1 | grep -c "GNU ld"')
- ifeq ($(GNU_LD),1)
-
- # Make sure this version of ld supports the -E option.
- LD_EXPORT_DEFINED := $(shell sh -c '$(LD_FOR_VERSION_TEST) -E 2>&1 | grep -i -e "(option|flag)" /dev/null; echo $$?')
- ifeq ($(LD_EXPORT_DEFINED),1)
- LDFLAGS += -Wl,-E
- endif # LD_EXPORT_DEFINED = 1
-
- endif # GNU ld
-
- endif # DLD
-
+ ifeq ($(GNU_LD),1)
+ # Make sure this version of ld supports the -E option.
+ LD_EXPORT_DEFINED := $(shell sh -c '$(LD_FOR_VERSION_TEST) -E 2>&1 | grep -i -e "(option|flag)" /dev/null; echo $$?')
+ ifeq ($(LD_EXPORT_DEFINED),1)
+ LDFLAGS += -Wl,-E
+ endif # LD_EXPORT_DEFINED = 1
+ endif # GNU ld
endif # static_libs_only
endif # shared_libs
diff --git a/include/makeinclude/platform_linux.GNU b/include/makeinclude/platform_linux.GNU
index 94b81d6527a..ea7c8737640 100644
--- a/include/makeinclude/platform_linux.GNU
+++ b/include/makeinclude/platform_linux.GNU
@@ -1,3 +1,4 @@
+# -*- Makefile -*-
# $Id$
# According to Bryon G. Rigg <bgrigg@opus.bcbnet.com>, this file
@@ -7,13 +8,10 @@
# optimize = 1
# We always include config-linux.h on Linux platforms.
-ifndef ACE_PLATFORM_CONFIG
- ACE_PLATFORM_CONFIG = config-linux.h
-endif
+ACE_PLATFORM_CONFIG ?= config-linux.h
+
+exceptions ?= 1
-ifndef exceptions
- exceptions = 1
-endif
ifeq (,$(debug))
debug = 1
endif
@@ -21,9 +19,7 @@ ifeq (,$(optimize))
optimize = 1
endif
-ifndef threads
- threads = 1
-endif
+threads ?= 1
PLATFORM_XT_CPPFLAGS=
PLATFORM_XT_LIBS=-lXt
@@ -52,10 +48,7 @@ PLATFORM_WX_LDFLAGS =
PLATFORM_AIO_SUPPORT := \
$(shell test -e /usr/lib/librt.so && echo -DACE_HAS_AIO_CALLS)
-ifndef ssl
- ssl = 0
-endif
-
+ssl ?= 0
ifeq ($(ssl),1)
# Some Linux OpenSSL installations compile in Kerberos support. Add
# the Kerberos include path to preprocessor include path.
@@ -69,16 +62,13 @@ ifeq ($(ssl),1)
PLATFORM_SSL_CPPFLAGS += -I/usr/kerberos/include
endif # ssl
-ifndef insure
- insure = 0
-endif
-
+insure ?= 0
ifeq ($(insure),1)
-CC = insure
-CXX = insure
+ CC = insure
+ CXX = insure
else
-CC = gcc
-CXX = g++
+ CC = gcc
+ CXX = g++
endif
CFLAGS += -W -Wall -Wpointer-arith -pipe
@@ -133,9 +123,7 @@ ifeq ($(threads),1)
endif # ! PRELIB
endif
-ifndef sctp
- sctp ?=
-endif
+sctp ?=
# support for OpenSS7 SCTP
ifeq ($(sctp),openss7)
PLATFORM_SCTP_CPPFLAGS= -DACE_HAS_OPENSS7_SCTP
diff --git a/include/makeinclude/rules.bin.GNU b/include/makeinclude/rules.bin.GNU
index 0f45b83db8c..73ffefb9245 100644
--- a/include/makeinclude/rules.bin.GNU
+++ b/include/makeinclude/rules.bin.GNU
@@ -30,12 +30,12 @@ PSRC += $(addsuffix .cpp, $(CLEANUP_BIN))
CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT))
-ifndef CHORUSLINK
- CHORUSLINK ?=
-endif # CHORUSLINK
-ifndef using_aix_vacpp
- using_aix_vacpp ?=
-endif
+CHORUSLINK ?=
+using_aix_vacpp ?=
+
+ifeq ($(static_libs_only),1)
+ LDFLAGS += $(STATIC_LINK_FLAG)
+endif # static_libs_only=1
ifeq ($(CHORUSLINK),true)
$(BIN): %: $(VDIR)%.$(OBJEXT) $(VOBJS)
diff --git a/include/makeinclude/rules.lib.GNU b/include/makeinclude/rules.lib.GNU
index fdf6bcce485..be70a002159 100644
--- a/include/makeinclude/rules.lib.GNU
+++ b/include/makeinclude/rules.lib.GNU
@@ -35,28 +35,23 @@ endif # versioned_so
# The following targets arrange to build both unshared and shared libraries
#----------------------------------------------------------------------------
-ifndef LIB
- LIB ?=
-endif
+LIB ?=
VLIB = $(LIB:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
+CLEANUP_VLIB = $(CLEANUP_LIB:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
# Add VLIB to VLIBS if building static_libs.
ifdef static_libs
VLIBS += $(VLIB)
endif
-ifndef SHLIB
- SHLIB ?=
-endif
+SHLIB ?=
# Setup shared library variables, including versions.
VSHLIB_NO_VER = $(SHLIB:%.$(SOEXT)=%$(VAR).$(SOEXT))
CLEANUP_VSHLIB_NO_VER = $(CLEANUP_SHLIB:%.$(SOEXT)=%$(VAR).$(SOEXT))
VSHLIB = $(VSHLIB_NO_VER:%=%$(SOVERSION))
CLEANUP_VSHLIB = $(CLEANUP_VSHLIB_NO_VER:%=%$(SOVERSION))
-ifndef SHLIBA
- SHLIBA ?=
-endif
+SHLIBA ?=
VSHLIBA = $(SHLIBA:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
# Add VSHLIB if we're building shared_libs.
@@ -76,6 +71,12 @@ ifeq ($(VLIBS),)
ifeq ($(LIB_WARNING),1)
@echo Warning: rules.lib.GNU included, but no library targets detected.
endif # LIB_WARNING
+else # VLIBS
+ # Libraries always depend on idl_stubs, if they exist.
+ IDL_SRC ?=
+ ifeq ($(IDL_SRC),)
+ $(VLIBS): $(IDL_SRC)
+ endif # IDL_SRC
endif # !VLIBS
VLOBJS += $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(LSRC)))))
@@ -88,7 +89,7 @@ VSHOBJS1 = $(addsuffix .$(OBJEXT),$(addprefix $(VSHDIR),$(basename $(notdir $(LS
ifdef static_libs
LIB_INSTALL += $(VLIB:%=$(INSLIB)/%)
- CLEANUP_INSTALL += $(CLEANUP_LIB:%=$(INSLIB)/%)
+ CLEANUP_INSTALL += $(CLEANUP_VLIB:%=$(INSLIB)/%)
endif # static_libs
ifdef shared_libs
@@ -101,13 +102,8 @@ ifdef shared_libs
endif
endif # shared_libs
-
-ifndef ace_lib_prelink
- ace_lib_prelink = 0
-endif
-ifndef aix_build
- aix_build = 0
-endif
+ace_lib_prelink ?= 0
+aix_build ?= 0
$(VLIB): $(VLOBJS)
diff --git a/include/makeinclude/rules.local.GNU b/include/makeinclude/rules.local.GNU
index 99fff4f8dd6..f4198157511 100644
--- a/include/makeinclude/rules.local.GNU
+++ b/include/makeinclude/rules.local.GNU
@@ -50,23 +50,12 @@ all.local: makefile_name.local $(split_target) build.objdirs build.local install
#----------------------------------------------------------------------------
-ifndef IDL_SRC
- IDL_SRC ?=
-endif
-ifndef VLIBS
- VLIBS ?=
-endif
-ifndef BUILD
- BUILD ?=
-endif
-ifndef VBIN
- ifdef BIN
- VBIN = $(BIN:%=%$(VAR))
- $(VBIN): $(VLIBS)
- else
- VBIN ?=
- endif
-endif
+IDL_SRC ?=
+VLIBS ?=
+BUILD ?=
+BIN ?=
+VBIN ?= $(BIN:%=%$(VAR))
+$(VBIN): $(VLIBS)
# Always build the V* targets in this order. We control assignment to them
# elsewhere. We add the existing $(BUILD) targets to the end to allow the
@@ -82,9 +71,7 @@ build.local: $(VBUILD)
# C++ related targets
-ifndef OS
- OS ?=
-endif
+OS ?=
ifeq ($(OS),"Windows_NT")
$(VDIR)%.obj: %.c
$(COMPILE.c) $(CC_OUTPUT_FLAG) $@ $<
@@ -207,20 +194,15 @@ show_uninit:
# Installation targets
#----------------------------------------------------------------------------
-ifndef INSTALL
- INSTALL ?=
-endif # INSTALL
-# Libraries always depend on idl_stubs, if they exist.
-ifdef IDL_SRC
- $(VLIBS): $(IDL_SRC)
-endif
-
+INSTALL ?=
# Always add LIB_INSTALL to INSTALL, so libs will get installed even no BIN
# is built. LIB_INSTALL is a dependency for BIN, so libs are installed prior
-# to use. Also, make LIB_INSTALL depend on VLIB, so libs get built prior to
+# to use. Also, make LIB_INSTALL depend on VLIBS, so libs get built prior to
# installation.
-INSTALL += $(LIB_INSTALL)
-$(LIB_INSTALL): $(VLIBS)
+ifdef LIB_INSTALL
+ INSTALL += $(LIB_INSTALL)
+ $(LIB_INSTALL): $(VLIBS)
+endif
install.local: $(INSTALL)
@@ -347,23 +329,14 @@ endif # DO_CLEANUP
# Dependency generation target
#----------------------------------------------------------------------------
-ifndef MAKEFILE
- MAKEFILE = Makefile
-endif # ! MAKEFILE
-
-ifndef DEPENDENCY_FILE
- DEPENDENCY_FILE = $(MAKEFILE)
-endif
+MAKEFILE ?= Makefile
+DEPENDENCY_FILE ?= $(MAKEFILE)
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif # TAO_ROOT
+TAO_ROOT ?= $(ACE_ROOT)/TAO
# If no libraries are build in the current directory (actually, if
# rules.lib.GNU isn't included), then SOEXT might not be set.
-ifndef SOEXT
- SOEXT=so
-endif # SOEXT
+SOEXT ?= so
ORIGdepend.local: $(MAKEFILE)
@$(RM) $(MAKEFILE).old
@@ -415,12 +388,9 @@ depend.local: $(MAKEFILE) idl_stubs.local
# RCS info target
#----------------------------------------------------------------------------
-ifndef IDL_FILES
- IDL_FILES ?=
-endif
-ifndef IDL_CLIENT_HDR_EXT
- IDL_CLIENT_HDR_EXT ?=
-endif
+IDL_FILES ?=
+IDL_CLIENT_HDR_EXT ?=
+
idl_stubs.local: $(foreach file, $(IDL_FILES), $(file)$(IDL_CLIENT_HDR_EXT))
ifdef $(TAO_IDL_DEP)
diff --git a/include/makeinclude/rules.nested.GNU b/include/makeinclude/rules.nested.GNU
index ac864a595c0..169a02acdfb 100644
--- a/include/makeinclude/rules.nested.GNU
+++ b/include/makeinclude/rules.nested.GNU
@@ -10,27 +10,13 @@
# variable must be set to its actual name before including this
# file to allow the recursive MAKE to work properly.
-ifndef MAKEFILE
- MAKEFILE ?=
-endif
-ifeq ($(MAKEFILE),)
- MAKEFILE = Makefile
-endif # ! MAKEFILE
-
-ifndef SUBDIR_MAKEFILE
- SUBDIR_MAKEFILE ?=
-endif
-ifeq ($(SUBDIR_MAKEFILE),)
- SUBDIR_MAKEFILE=$(MAKEFILE)
-endif
+MAKEFILE ?= Makefile
+SUBDIR_MAKEFILE ?= $(MAKEFILE)
# Make sure that we build directories with DIRS= in sequence instead of in
# parallel, unless DIRS_PARALLEL is set, in which case they may be built
# in parallel if enabled by the proper flags and not disabled elsewhere.
-
-ifndef DIRS_PARALLEL
- DIRS_PARALLEL ?=
-endif # DIRS_PARALLEL
+DIRS_PARALLEL ?=
ifeq ($(DIRS_PARALLEL),)
.NOTPARALLEL:
diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU
index 647d2be0820..22948a703a6 100644
--- a/include/makeinclude/wrapper_macros.GNU
+++ b/include/makeinclude/wrapper_macros.GNU
@@ -257,36 +257,24 @@ ACE_MAJOR_VERSION := $(shell awk '/ACE_MAJOR_VERSION/ { print $$3}' ${ACE_ROOT}/
ACE_MINOR_VERSION := $(shell awk '/ACE_MINOR_VERSION/ { print $$3}' ${ACE_ROOT}/ace/Version.h)
ACE_BETA_VERSION := $(shell awk '/ACE_BETA_VERSION/ { print $$3}' ${ACE_ROOT}/ace/Version.h)
-ifndef PACE_ROOT
- PACE_ROOT = $(ACE_ROOT)/PACE
-endif # PACE_ROOT
+PACE_ROOT ?= $(ACE_ROOT)/PACE
# Define some variables to silence warnings
-ifndef SHR_FILTER
- SHR_FILTER ?=
-endif # SHR_FILTER
+SHR_FILTER ?=
# Include this before the below variables to make it possible for
# platform_macros.GNU to set default values for them.
include $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
# Define some variables to silence warnings
-ifndef GHS
- GHS ?=
-endif
-ifndef CHORUS
- CHORUS ?=
-endif
-ifndef AIX_TEMPLATE_HACK
- AIX_TEMPLATE_HACK ?=
-endif
+GHS ?=
+CHORUS ?=
+AIX_TEMPLATE_HACK ?=
# $(ACE_PLATFORM_CONFIG) is used in dependency rules and corresponds to the
# platform dependent config-*.h file included in config.h, and can be set
# in your platform_*.GNU file or platform_macros.GNU.
-ifndef ACE_PLATFORM_CONFIG
- ACE_PLATFORM_CONFIG = config.h
-endif
+ACE_PLATFORM_CONFIG ?= config.h
ifeq ($(threads),0)
ifneq ($(findstring -DACE_MT_SAFE=0,$(CPPFLAGS)),-DACE_MT_SAFE=0)
@@ -298,95 +286,54 @@ endif # threads
#### Defaults are exceptions off (0), fast off (0), rtti off (0), and
#### versioned_so on (1).
####
-ifndef exceptions
- exceptions = 0
-endif
+exceptions ?= 0
-ifndef fast
- fast = 0
-endif
+fast ?= 0
# @@@ Should this really be the default? Or should we let the
# compiler choose?
-ifndef rtti
- rtti = 0
-endif
+rtti ?= 0
ifeq (,$(versioned_so))
versioned_so = 1
endif
-ifndef SOVERSION
- SOVERSION ?=
-endif # SOVERSION
-ifndef SONAME
- SONAME ?=
-endif
+SOVERSION ?=
+SONAME ?=
#----------------------------------------------------------------------------
# Platform-independent macro definitions
#----------------------------------------------------------------------------
-ifndef INCLDIRS
- INCLDIRS ?=
-endif
-ifndef DEFFLAGS
- DEFFLAGS ?=
-endif
+INCLDIRS ?=
+DEFFLAGS ?=
CPPFLAGS += $(DEFFLAGS) $(INCLDIRS)
# Define default extentions for IDL-generated files
-ifndef IDL_CLIENT_HDR_EXT
-IDL_CLIENT_HDR_EXT = C.h
-endif
-ifndef IDL_CLIENT_INL_EXT
-IDL_CLIENT_INL_EXT = C.i
-endif
-ifndef IDL_CLIENT_SRC_EXT
-IDL_CLIENT_SRC_EXT = C.cpp
-endif
-ifndef IDL_SERVER_HDR_EXT
-IDL_SERVER_HDR_EXT = S.h
-endif
-ifndef IDL_SERVER_INL_EXT
-IDL_SERVER_INL_EXT = S.i
-endif
-ifndef IDL_SERVER_SRC_EXT
-IDL_SERVER_SRC_EXT = S.cpp
-endif
-ifndef IDL_SERVER_THDR_EXT
-IDL_SERVER_THDR_EXT = S_T.h
-endif
-ifndef IDL_SERVER_TINL_EXT
-IDL_SERVER_TINL_EXT = S_T.i
-endif
-ifndef IDL_SERVER_TSRC_EXT
-IDL_SERVER_TSRC_EXT = S_T.cpp
-endif
+IDL_CLIENT_HDR_EXT ?= C.h
+IDL_CLIENT_INL_EXT ?= C.i
+IDL_CLIENT_SRC_EXT ?= C.cpp
+IDL_SERVER_HDR_EXT ?= S.h
+IDL_SERVER_INL_EXT ?= S.i
+IDL_SERVER_SRC_EXT ?= S.cpp
+IDL_SERVER_THDR_EXT ?= S_T.h
+IDL_SERVER_TINL_EXT ?= S_T.i
+IDL_SERVER_TSRC_EXT ?= S_T.cpp
ifeq (,$(findstring -I$(ACE_ROOT),$(INCLDIRS)))
INCLDIRS += -I$(ACE_ROOT)
endif
-ifndef INSBIN
- INSBIN = $(ACE_ROOT)/bin
-endif
-ifndef INSINC
- INSINC = $(ACE_ROOT)/ace
-endif
-ifndef INSLIB
- INSLIB = $(ACE_ROOT)/ace
-endif
-ifndef INSMAN
- INSMAN = $(ACE_ROOT)/man
-endif
+INSBIN ?= $(ACE_ROOT)/bin
+INSINC ?= $(ACE_ROOT)/ace
+INSLIB ?= $(ACE_ROOT)/ace
+INSMAN ?= $(ACE_ROOT)/man
+
ifeq (,$(findstring -L$(ACE_ROOT)/ace,$(LDFLAGS)))
LDFLAGS += -L$(ACE_ROOT)/ace -L./
endif
-LEX = flex
+LEX ?= flex
-ifndef EXEEXT
- EXEEXT ?=
-endif
+EXEEXT ?=
ifndef COMSPEC
ifdef ComSpec
@@ -409,20 +356,14 @@ PCCFLAGS += #### set in platform_macros.GNU file, e.g., -p
VAR =
# Let users override the default VDIR directories
-ifndef VDIR
-VDIR = .obj/
-endif # VDIR
-ifndef VSHDIR
- VSHDIR = .shobj/
-endif # VSHDIR
-
-ifndef ACELIB
- ACELIB = -lACE
-endif
+VDIR ?= .obj/
+VSHDIR ?= .shobj/
+
+ACELIB ?= -lACE
# NOTE: VLDLIBS is defined below, in case it is overridden for static-
# or shared-only builds.
-YACC = bison
+YACC ?= bison
@@ -439,29 +380,13 @@ ifeq ($(findstring g++,$(CXX)),g++)
endif # ! ACE_HAS_GNUG_PRE_2_8
endif # g++
-ifndef OBJEXT
- OBJEXT=o
-endif
-
-ifndef SOEXT
- SOEXT=so
-endif
-
-ifndef LIBEXT
- LIBEXT=a
-endif
-
-ifndef CC_OUTPUT_FLAG
- CC_OUTPUT_FLAG = -o
-endif # CC_OUTPUT_FLAG
+OBJEXT ?= o
+SOEXT ?= so
+LIBEXT ?= a
-ifndef SO_OUTPUT_FLAG
- SO_OUTPUT_FLAG = -o
-endif # SO_OUTPUT_FLAG
-
-ifndef LINK_OUTPUT_FLAG
- LINK_OUTPUT_FLAG = -o
-endif # LINK_OUTPUT_FLAG
+CC_OUTPUT_FLAG ?= -o
+SO_OUTPUT_FLAG ?= -o
+LINK_OUTPUT_FLAG ?= -o
#----------------------------------------------------------------------------
# make flags
@@ -476,9 +401,7 @@ ifneq ($(optimize),)
CCFLAGS += $(OCCFLAGS)
endif # optimize
-ifndef split
- split = 0
-endif
+split ?= 0
ifeq ($(split),0)
override split =
endif # split
@@ -522,9 +445,7 @@ ifneq ($(xt_reactor),)
ACE_MAKE_OPTIONS += xt_reactor
endif # xt_reactor
-ifndef fl_reactor
- fl_reactor ?=
-endif
+fl_reactor ?=
ifeq ($(fl_reactor),0)
override fl_reactor =
endif # fl_reactor
@@ -538,9 +459,7 @@ ifneq ($(fl_reactor),)
ACE_MAKE_OPTIONS += rl_reactor
endif # fl_reactor
-ifndef tk_reactor
- tk_reactor ?=
-endif
+tk_reactor ?=
ifeq ($(tk_reactor),0)
override tk_reactor =
endif # tk_reactor
@@ -553,9 +472,7 @@ ifneq ($(tk_reactor),)
ACE_MAKE_OPTIONS += tk_reactor
endif # tk_reactor
-ifndef qt_reactor
- qt_reactor ?=
-endif
+qt_reactor ?=
ifeq ($(qt_reactor),0)
override qt_reactor =
endif # qt_reactor
@@ -568,18 +485,14 @@ ifneq ($(qt_reactor),)
ACE_MAKE_OPTIONS += qt_reactor
endif # qt_reactor
-ifndef QTDIR
- QTDIR ?=
-endif
+QTDIR ?=
ifneq ($(QTDIR),)
MOC = ${QTDIR}/bin/moc
else
MOC = moc
endif
-ifndef gtk_reactor
- gtk_reactor ?=
-endif
+gtk_reactor ?=
ifeq ($(gtk_reactor),0)
override gtk_reactor =
endif # gtk_reactor
@@ -592,9 +505,7 @@ ifneq ($(gtk_reactor),)
ACE_MAKE_OPTIONS += gtk_reactor
endif # gtk_reactor
-ifndef rapi
- rapi ?=
-endif
+rapi ?=
ifeq ($(rapi),0)
override rapi =
endif #rapi
@@ -606,9 +517,7 @@ ifneq ($(rapi),)
ACE_MAKE_OPTIONS += rapi
endif # rapi
-ifdef sctp
- sctp ?=
-endif
+sctp ?=
ifeq ($(sctp),0)
override sctp =
endif #rapi
@@ -621,9 +530,7 @@ ifneq ($(sctp),)
ACE_MAKE_OPTIONS += sctp
endif
-ifndef ace_with_gl
- ace_with_gl ?=
-endif
+ace_with_gl ?=
ifeq ($(ace_with_gl),0)
override ace_with_gl =
endif # ace_with_gl
@@ -636,9 +543,7 @@ ifneq ($(ace_with_gl),)
ACE_MAKE_OPTIONS += ace_with_gl
endif # ace_with_gl
-ifndef ace_with_xll
- ace_with_x11 ?=
-endif
+ace_with_x11 ?=
ifeq ($(ace_with_x11),0)
override ace_with_x11 =
endif # ace_with_x11
@@ -650,9 +555,7 @@ ifneq ($(ace_with_x11),)
ACE_MAKE_OPTIONS += ace_with_x11
endif # ace_with_x11
-ifndef ssl
- ssl ?=
-endif
+ssl ?=
ifeq ($(ssl),0)
override ssl =
else
@@ -690,9 +593,7 @@ else # exceptions
ACE_MAKE_OPTIONS += exceptions
endif # exceptions
-ifndef profile
- profile ?=
-endif
+profile ?=
ifeq ($(profile),0)
override profile =
endif # profile
@@ -718,16 +619,12 @@ ifeq ($(static_libs),0)
override static_libs =
endif # static_libs
-ifndef shared_libs_only
- shared_libs_only ?=
-endif
+shared_libs_only ?=
ifeq ($(shared_libs_only),0)
override shared_libs_only =
endif # shared_libs_only
-ifndef static_libs_only
- static_libs_only ?=
-endif
+static_libs_only ?=
ifeq ($(static_libs_only),0)
override static_libs_only =
endif # static_libs_only
@@ -755,9 +652,7 @@ ifdef static_libs
ACE_MAKE_OPTIONS += static_libs
endif
-ifndef ACE_SHLIBS
- ACE_SHLIBS ?=
-endif # ACE_SHLIBS
+ACE_SHLIBS ?=
ifdef shared_libs
ifdef SHLIBA
@@ -784,9 +679,7 @@ endif # kylix
VLDLIBS = $(LDLIBS) $(ACELIB) $(LIBS)
-ifndef probe
- probe ?=
-endif
+probe ?=
ifeq ($(probe),0)
override probe =
endif # probe
@@ -795,9 +688,7 @@ ifeq ($(probe),1)
CPPFLAGS += -DACE_COMPILE_TIMEPROBES
endif # probe
-ifndef purify
- purify ?=
-endif
+purify ?=
ifeq ($(purify),0)
override purify =
endif # purify
@@ -819,9 +710,7 @@ PURE_CACHE_DIR = $(PURE_CACHE_BASE_DIR)-$(LOGNAME)-$(notdir $(CXX) )
CPPFLAGS += -DACE_HAS_PURIFY -I$(ACE_PURIFY_DIR)
endif # purify
-ifndef quantify
- quantify ?=
-endif
+quantify ?=
ifeq ($(quantify),0)
override quantify =
endif # quantify
@@ -843,9 +732,7 @@ ifdef quantify
endif # sparc
endif # quantify
-ifndef repo
- repo ?=
-endif
+repo ?=
ifeq ($(repo),0)
override repo =
endif # repo
@@ -859,9 +746,7 @@ ifdef repo
endif # repo
# If pipes is not set, we default to 0
-ifndef pipes
- pipes = 0
-endif
+pipes ?= 0
# If pipes is set to 1 then add the compiler flag -pipe. This uses pipe instead
# of intermediate files. This can be disabled by setting pipes to 0 in the
@@ -871,18 +756,13 @@ ifeq ($(pipes),1)
endif # pipes
# RMCast is turned on by default
-ifndef rmcast
- rmcast = 1
-endif
-
+rmcast ?= 1
ifeq ($(rmcast),1)
ACE_MAKE_OPTIONS += rmcast
endif
# If not explicitly is set that we don't have rwho, assume we have it.
-ifndef rwho
- rwho = 1
-endif
+rwho ?= 1
# If not explicitly is set that we have wfmo, assume we don't have it.
ifndef wfmo
@@ -893,30 +773,17 @@ endif
# Conditional macro definitions
#----------------------------------------------------------------------------
-ifndef PTDIRS
- PTDIRS ?=
-endif # PTDIRS
-ifndef PRELINK
- PRELINK ?=
-endif # PRELINK
-ifndef POSTLINK
- POSTLINK ?=
-endif # POSTLINK
-ifndef PURELINK
- PURELINK ?=
-endif # PURELINK
-ifndef TEMPLATES_FLAG
- TEMPLATES_FLAG ?=
-endif # TEMPLATES_FLAG
-ifndef MVCMD
- MVCMD ?=
-endif # MVCMD
+PTDIRS ?=
+PRELINK ?=
+POSTLINK ?=
+PURELINK ?=
+TEMPLATES_FLAG ?=
+MVCMD ?=
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS) -c
-ifndef RC
- RC ?=
-endif
+RC ?=
+
COMPILE.rc = $(RC)
COMPILE-NO_DASH_G.cc = `echo $(COMPILE.cc) | sed 's/-g //'`
# 960905 Marius Kjeldahl <marius@funcom.com>