summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-24 04:29:39 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-24 04:29:39 +0000
commite74076bcebe7877c23b5f233b775e904a40312f6 (patch)
treeef6aada52e5b3aebde0cf980cb542cd9031f07c0 /include
parentf366443b812d0df964a9bbfb5696b5e84c2e9f2e (diff)
downloadATCD-e74076bcebe7877c23b5f233b775e904a40312f6.tar.gz
ChangeLogTag:Mon Nov 24 02:38:58 UTC 2003 Don Hinton <dhinton@dresystems.com>
Diffstat (limited to 'include')
-rw-r--r--include/makeinclude/all_in_one.GNU51
-rw-r--r--include/makeinclude/platform_g++_common.GNU11
-rw-r--r--include/makeinclude/platform_linux.GNU14
-rw-r--r--include/makeinclude/rules.bin.GNU42
-rw-r--r--include/makeinclude/rules.lib.GNU57
-rw-r--r--include/makeinclude/rules.local.GNU84
-rw-r--r--include/makeinclude/wrapper_macros.GNU237
7 files changed, 334 insertions, 162 deletions
diff --git a/include/makeinclude/all_in_one.GNU b/include/makeinclude/all_in_one.GNU
index 7999ee82ab8..96fc4202620 100644
--- a/include/makeinclude/all_in_one.GNU
+++ b/include/makeinclude/all_in_one.GNU
@@ -28,24 +28,24 @@ include $(ACE_ROOT)/include/makeinclude/component_check.GNU
# If no required components are missing, set the real targets
ifeq ($(MISSING_COMPONENTS),)
- ifneq ($(CLEANUP_BIN),)
- ifeq ($(BIN),)
- BIN = $(CLEANUP_BIN)
+ ifdef BIN_UNCHECKED
+ ifndef BIN
+ BIN = $(BIN_UNCHECKED)
endif # !BIN
- endif # !CLEANUP_BIN
+ endif # !BIN_UNCHECKED
ifdef static_libs
- ifneq ($(CLEANUP_LIB),)
- ifeq ($(LIB),)
- LIB = $(CLEANUP_LIB)
+ ifdef LIB_UNCHECKED
+ ifndef LIB
+ LIB = $(LIB_UNCHECKED)
endif # !LIB
- endif # !CLEANUP_LIB
+ endif # !LIB_UNCHECKED
endif # static_libs
ifdef shared_libs
- ifneq ($(CLEANUP_SHLIB),)
- ifeq ($(SHLIB),)
- SHLIB = $(CLEANUP_SHLIB)
+ ifdef SHLIB_UNCHECKED
+ ifndef SHLIB
+ SHLIB = $(SHLIB_UNCHECKED)
endif # !SHLIB
- endif # !CLEANUP_SHLIB
+ endif # !SHLIB_UNCHECKED
endif # !shared_libs
endif # COMPILE_COMPONENT
@@ -53,18 +53,15 @@ include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU
-# The CLEAN_* targets are defined in wrapper_macros.GNU, so use them
-# to determine if we should include rules.bin.GNE or rules.lib.GNU.
-
-ifneq ($(CLEANUP_BIN),)
+ifdef BIN
include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-endif # CLEANUP_BIN
+endif # BIN
-ifneq ($(CLEANUP_LIB),)
+ifdef LIB
include_lib = 1
endif # LIB
-ifneq ($(CLEANUP_SHLIB),)
+ifdef SHLIB
include_lib = 1
endif # SHLIB
@@ -72,23 +69,13 @@ ifeq ($(include_lib),1)
include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
endif
-# Always build the V* targets in this order. We control assignment to them
-# elsewhere.
-BUILD = $(IDL_SRC) $(VLIBS) $(VBIN)
-
-# Add VSHLIB if we're building shared_libs, could be undefined.
-ifdef shared_libs
- VLIBS = $(VSHLIB) $(SHLIBA)
-endif
-
-# Finally, add VLIB if building static_libs, which could also be undefined.
-ifdef static_libs
- VLIBS += $(VLIB)
-endif
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
# Remove the -g option if requested.
+ifndef SUPPRESS_DASH_G
+ SUPPRESS_DASH_G ?=
+endif
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 11e60ffb145..3cf2db9691c 100644
--- a/include/makeinclude/platform_g++_common.GNU
+++ b/include/makeinclude/platform_g++_common.GNU
@@ -14,7 +14,7 @@ CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)
# If no option has been specified, try to enable templates based on the
# version of the compiler.
#
-ifeq ($(templates),)
+ifndef templates
ifeq (2.95,$(findstring 2.95,$(CXX_VERSION)))
templates = automatic
else
@@ -46,9 +46,12 @@ 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.
-ifeq (,$(versioned_so))
+ifndef versioned_so
versioned_so = 1
endif
+ifndef with_ld
+ with_ld ?=
+endif
ifeq ($(versioned_so),1)
ifeq ($(with_ld),hpux)
SOFLAGS += -Wl,+h -Wl,$(SONAME)
@@ -60,6 +63,10 @@ ifeq ($(versioned_so),1)
endif
endif
+ifndef static_libs_only
+ static_libs_only ?=
+endif
+
# 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)
diff --git a/include/makeinclude/platform_linux.GNU b/include/makeinclude/platform_linux.GNU
index 9ea9a7a6530..94b81d6527a 100644
--- a/include/makeinclude/platform_linux.GNU
+++ b/include/makeinclude/platform_linux.GNU
@@ -21,7 +21,7 @@ ifeq (,$(optimize))
optimize = 1
endif
-ifeq (,$(threads))
+ifndef threads
threads = 1
endif
@@ -52,6 +52,9 @@ PLATFORM_WX_LDFLAGS =
PLATFORM_AIO_SUPPORT := \
$(shell test -e /usr/lib/librt.so && echo -DACE_HAS_AIO_CALLS)
+ifndef ssl
+ ssl = 0
+endif
ifeq ($(ssl),1)
# Some Linux OpenSSL installations compile in Kerberos support. Add
@@ -64,7 +67,11 @@ ifeq ($(ssl),1)
# installations use shared OpenSSL libraries so we should be okay,
# at least until we migrate to Autoconf.
PLATFORM_SSL_CPPFLAGS += -I/usr/kerberos/include
-endif # threads
+endif # ssl
+
+ifndef insure
+ insure = 0
+endif
ifeq ($(insure),1)
CC = insure
@@ -126,6 +133,9 @@ ifeq ($(threads),1)
endif # ! PRELIB
endif
+ifndef sctp
+ sctp ?=
+endif
# 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 87162615587..b30c57fe34a 100644
--- a/include/makeinclude/rules.bin.GNU
+++ b/include/makeinclude/rules.bin.GNU
@@ -8,31 +8,53 @@
# Requires GNU make
#----------------------------------------------------------------------------
+ifdef BIN
+ VBIN = $(BIN:%=%$(VAR))
+ # VBIN always depends on idl_stubs and libraries, if they exist.
+ ifdef IDL_SRC
+ $(VBIN): $(IDL_SRC)
+ endif
+ ifdef VLIBS
+ $(VBIN): $(VLIBS)
+ endif
+else # !BIN
+ ifndef BIN_UNCHECKED
+ @echo Warning: rules.bin.GNU included, but no BIN targets detected.
+ endif # !BIN_UNCHECKED
+endif # BIN
+
VOBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(SRC)))))
# Needed for depend.
PSRC += $(addsuffix .cpp, $(CLEANUP_BIN))
+ifndef EXEEXT
+ EXEEXT ?=
+endif
+
+CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT))
+
ifeq ($(CHORUSLINK),true)
$(BIN): %: $(VDIR)%.$(OBJEXT) $(VOBJS)
- $(LINK.cc) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(LDFLAGS) $(POSTLINK)
+ $(LINK.cc) $(CC_OUTPUT_FLAG) $@ $(sort $(VDIR)$@.$(OBJEXT) $(VOBJS)) $(VLDLIBS) $(LDFLAGS) $(POSTLINK)
# $(MERGEDIR)/dtool/mkctors $@.xp.o > $@.ct.s
# $(CXX) -c $@.ct.s
# $(RM) $@.ct.s
# $(LD) $(LDOPTIONS) -e _start -o $@ $(MERGEDIR)/lib/crt/crth.u.o $(MERGEDIR)/lib/crt/crt0.o $(MERGEDIR)/lib/crt/crti.o $@.xp.o $@.ct.o $(MERGEDIR)/lib/crt/crtn.o -dn -T $(MERGEDIR)/src/act/slots/act_u.ld
# $(RM) $@.xp.o
# $(RM) $@.ct.o
-else
-ifeq (1,$(using_aix_vacpp))
+else # !CHORUSLINK
+ ifeq (1,$(using_aix_vacpp))
$(BIN): %: %.icc $(SRC)
vacbld_r $< -severitylevel=warning
-else
-ifdef kylix
+ else # !using_aix_vacpp
+ ifdef kylix
$(BIN): %: $(VDIR)%.$(OBJEXT) $(VOBJS)
- $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,,
-else
+ $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $(sort $(VDIR)$@.$(OBJEXT) $(VOBJS)) , $@,,
+ else # !kylix
$(BIN): %: $(VDIR)%.$(OBJEXT) $(VOBJS)
- $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK)
-endif
-endif
+ $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(sort $(VDIR)$@.$(OBJEXT) $(VOBJS)) $(VLDLIBS) $(POSTLINK)
+ endif # kylix
+ endif # using_aix_vacpp
endif
+
diff --git a/include/makeinclude/rules.lib.GNU b/include/makeinclude/rules.lib.GNU
index 1995484bdf5..a72a975126a 100644
--- a/include/makeinclude/rules.lib.GNU
+++ b/include/makeinclude/rules.lib.GNU
@@ -11,25 +11,65 @@
# The following targets arrange to build both unshared and shared libraries
#----------------------------------------------------------------------------
+ifndef LIB
+ LIB ?=
+endif
+VLIB = $(LIB:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
+
+# Add VLIB to VLIBS if building static_libs.
+ifdef static_libs
+ VLIBS += $(VLIB)
+endif
+
+ifndef SHLIB
+ SHLIB ?=
+endif
+# 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))
-ifdef SHLIBA
+ifndef SHLIBA
+ SHLIBA ?=
+endif
VSHLIBA = $(SHLIBA:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
+
+# Add VSHLIB if we're building shared_libs.
+ifdef shared_libs
+ VLIBS += $(VSHLIB) $(VSHLIBA)
endif
-VLOBJS += $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(LSRC)))))
-LSRC += $(LSRC2)
+# Warn if no libs found
+ifeq ($(VLIBS),)
+ LIB_WARNING = 0
+ ifndef LIB_UNCHECKED
+ LIB_WARNING = 1
+ endif # !LIB_CHECKED
+ ifndef SHLIB_UNCHECKED
+ LIB_WARNING = 1
+ endif # !SHLIB_UNCHECKED
+ ifeq ($(LIB_WARNING),1)
+ @echo Warning: rules.lib.GNU included, but no library targets detected.
+ endif # LIB_WARNING
+endif # !VLIBS
+
+# Libraries always depend on idl_stubs, if they exist.
+ifdef IDL_SRC
+ $(VLIBS): $(IDL_SRC)
+endif
+VLOBJS += $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(LSRC)))))
+ifdef LSRC2
+ LSRC += $(LSRC2)
+endif
VSHOBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VSHDIR),$(basename $(notdir $(LSRC)))))
VSHOBJS1 = $(addsuffix .$(OBJEXT),$(addprefix $(VSHDIR),$(basename $(notdir $(LSRC)))))
ifdef static_libs
INSTALL += $(VLIB:%=$(INSLIB)/%)
- CLEANUP_INSTALL = $(CLEANUP_LIB:%=$(INSLIB)/%)
+ CLEANUP_INSTALL += $(CLEANUP_LIB:%=$(INSLIB)/%)
endif # static_libs
ifdef shared_libs
@@ -42,9 +82,12 @@ ifdef shared_libs
endif
endif # shared_libs
-# Uncomment the remaining lines if you want to build both *.a and *.so
-# libraries...
-VLIB = $(LIB:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
+ifndef ace_lib_prelink
+ ace_lib_prelink = 0
+endif
+ifndef aix_build
+ aix_build = 0
+endif
$(VLIB): $(VLOBJS)
diff --git a/include/makeinclude/rules.local.GNU b/include/makeinclude/rules.local.GNU
index be8cd97e811..8df8726e98b 100644
--- a/include/makeinclude/rules.local.GNU
+++ b/include/makeinclude/rules.local.GNU
@@ -7,19 +7,24 @@
# Requires GNU make
#----------------------------------------------------------------------------
-ifneq ($(CLEANUP_BIN),)
+CLEANUP_OBJDIRS =
+CLEANUP_DIRS =
+
+ifdef CLEANUP_BIN
CLEANUP_OBJDIRS = $(VDIR)
else # ! CLEANUP_BIN
- ifneq ($(CLEANUP_LIB),)
+ ifdef CLEANUP_LIB
CLEANUP_OBJDIRS = $(VDIR)
endif # CLEANUP_LIB
endif # CLEANUP_BIN
-ifneq ($(CLEANUP_SHLIB),)
+ifdef CLEANUP_SHLIB
CLEANUP_OBJDIRS += $(VSHDIR)
endif # CLEANUP_VSHLIB
-CLEANUP_DIRS += $(TEMPINCDIR)
+ifdef TEMPINCDIR
+ CLEANUP_DIRS += $(TEMPINCDIR)
+endif
ifdef sun
CLEANUP_DIRS += SunWS_cache
@@ -28,24 +33,55 @@ endif
#### TEMPLATE_REPOSITORY can be set in individual platform files
#### to create template repository directories. See
#### platform_sunos5_sunc++.GNU for an example.
+ifdef TEMPLATE_REPOSITORY
CLEANUP_DIRS += $(TEMPLATE_REPOSITORY)
+endif
+makefile_name.local:
+ @echo
+ @echo Makefile: $(shell pwd)/$(MAKEFILE)
+ @echo
-
-all.local: $(split_target) build.objdirs build.local install.local
+all.local: makefile_name.local $(split_target) build.objdirs build.local install.local
#----------------------------------------------------------------------------
# C/C++ compilation targets
#----------------------------------------------------------------------------
-build.local: $(BUILD)
-# Set up the suffixes for C++ and IDL.
+ifndef IDL_SRC
+ IDL_SRC ?=
+endif
+ifndef VLIBS
+ VLIBS ?=
+endif
+ifndef BUILD
+ BUILD ?=
+endif
+ifndef VBIN
+ ifdef BIN
+ VBIN = $(BIN:%=%$(VAR))
+ $(VBIN): $(VLIBS)
+ endif
+endif
+
+# 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
+# caller to set additional ones, e.g., when defining multiple targets in a
+# single makefile--note that we filter out any that are already present.
+VBUILD = $(IDL_SRC) $(VLIBS) $(VBIN) $(filter-out $(IDL_SRC) $(VLIBS) $(VBIN), $(BUILD))
+
+build.local: $(VBUILD)
+
+# By setting SUFFIXES to nothing, we turn off all implicit rules, and force
+# make to only use the explicit ones we define.
.SUFFIXES:
-.SUFFIXES: .cpp .cc .C .cxx .idl $(SUFFIXES)
# C++ related targets
+ifndef OS
+ OS ?=
+endif
ifeq ($(OS),"Windows_NT")
$(VDIR)%.obj: %.c
$(COMPILE.c) $(CC_OUTPUT_FLAG) $@ $<
@@ -146,10 +182,6 @@ $(VSHDIR).creation_stamp:
endif
endif
-# Rebuild IDL_SRC id the IDL files change.
-$(IDL_SRC): $(addsuffix .idl, $(IDL_FILES))
-
-
#----------------------------------------------------------------------------
# Library generation targets
#----------------------------------------------------------------------------
@@ -181,7 +213,7 @@ ifneq ($(CLEANUP_INSTALL),)
$(RM) $(CLEANUP_INSTALL)
endif # CLEANUP_INSTALL
-ifeq (,$(LN_S))
+ifndef LN_S
ifndef COMSPEC
ifdef ComSpec
#### ACE+TAO use COMSPEC, but ComSpec is defined.
@@ -238,22 +270,22 @@ endif
# Cleanup targets
#----------------------------------------------------------------------------
-clean_idl_stubs.local:
-ifneq ($(IDL_FILES),)
+clean_idl_stubs.local: makefile_name.local
+ifdef IDL_FILES
-$(RM) $(foreach ext, $(IDL_EXT), $(addsuffix $(ext), $(IDL_FILES)))
endif
-ifneq ($(CLEANUP_BIN),)
+ifdef CLEANUP_BIN
DO_CLEANUP = 1
REALCLEAN_FILES = $(CLEANUP_BIN:%=%$(EXEEXT)) $(CLEANUP_BIN:%=%_debug$(EXEEXT)) $(CLEANUP_BIN:%=%_profile$(EXEEXT)) $(CLEANUP_BIN:%=%_optimize$(EXEEXT))
endif # !CLEANUP_BIN
-ifneq ($(CLEANUP_LIB),)
+ifdef CLEANUP_LIB
DO_CLEANUP = 1
REALCLEAN_FILES += $(CLEANUP_LIB:%=%) $(CLEANUP_LIB:%=%_debug) $(CLEANUP_LIB:%=%_profile) $(CLEANUP_LIB:%=%_optimize)
endif # !CLEANUP_LIB
-ifneq ($(CLEANUP_SHLIB),)
+ifdef CLEANUP_SHLIB
DO_CLEANUP = 1
REALCLEAN_FILES += $(CLEANUP_VSHLIB:%=%) $(CLEANUP_VSHLIB_NO_VER:%=%) $(CLEANUP_VSHLIB_NO_VER:%=%_debug) $(CLEANUP_VSHLIB_NO_VER:%=%_profile) $(CLEANUP_VSHLIB_NO_VER:%=%_optimize)
endif # !CLEANUP_SHLIB
@@ -262,7 +294,7 @@ CLEANUP_OBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(
CLEANUP_OBJS += $(addsuffix .o, $(addprefix $(VDIR),$(CLEANUP_BIN)))
CLEANUP_OBJS += $(addsuffix .$(OBJEXT),$(addprefix $(VSHDIR),$(basename $(notdir $(LSRC)))))
-clean.local:
+clean.local: makefile_name.local
ifdef DO_CLEANUP
-$(RM) -r \
*.$(OBJEXT) *~ *.bak *.rpo *.sym lib*.*_pure_* \
@@ -282,11 +314,11 @@ endif # DO_CLEANUP
# Dependency generation target
#----------------------------------------------------------------------------
-ifeq ($(MAKEFILE),)
+ifndef MAKEFILE
MAKEFILE = Makefile
endif # ! MAKEFILE
-ifeq ($(DEPENDENCY_FILE),)
+ifndef DEPENDENCY_FILE
DEPENDENCY_FILE = $(MAKEFILE)
endif
@@ -328,7 +360,7 @@ depend.local: $(DEPENDENCY_FILE)
-include $(DEPENDENCY_FILE)
endif
-ifeq ($(DEPGEN),)
+ifndef DEPGEN
DEPGEN = $(ACE_ROOT)/bin/g++dep
endif
@@ -350,6 +382,12 @@ 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_stubs.local: $(foreach file, $(IDL_FILES), $(file)$(IDL_CLIENT_HDR_EXT))
#----------------------------------------------------------------------------
diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU
index 27a4cb4cc92..d199760e5ec 100644
--- a/include/makeinclude/wrapper_macros.GNU
+++ b/include/makeinclude/wrapper_macros.GNU
@@ -89,14 +89,12 @@
#
# Variable Description
# -------- -----------
-# ACE_HAS_GNUG_PRE_2_8 CXX includes "g++", and the g++ version is
-# prior to 2.8.0. This is automatically determined
-# below, but can be overridden in the user's
-# platform_macros.GNU or environment. Three values
-# are supported:
-# 1 for g++ < 2.8.0,
-# 0 for g++ >= 2.8.0 or egcs,
-# undefined for non-g++ compilers.
+# ACE_HAS_GNUG_PRE_2_8 CXX
+# includes "g++", and the g++ version is prior to 2.8.0. This is
+# automatically determined below, but can be overridden in the
+# user's platform_macros.GNU or environment. Three values are
+# supported: 1 for g++ < 2.8.0, 0 for g++ >= 2.8.0 or egcs,
+# undefined for non-g++ compilers.
# ARFLAGS Flags for the archive utility (ar)
# CC C compiler command
# CXX C++ compiler command
@@ -113,8 +111,9 @@
# DLD Name of dynamic linker
# LD Name of linker
# IDL Name of the CORBA IDL compiler
-# TEMPLATES_FLAG Flag to pass to the compiler to control the instantiation of
-# templates.
+# TEMPLATES_FLAG
+# Flag to pass to the compiler to control the instantiation of
+# templates.
# INSBIN Binary (executable) installation directory
# INSINC Include file installation directory
# INSMAN Manpage installation directory
@@ -127,18 +126,30 @@
# OCCFLAGS Optimizing C++ compilation flags
# PCFLAGS C compilation flags for profiling
# PCCFLAGS C++ compilation flags for profiling
-# PLATFORM_XT_CPPFLAGS Platform CPP options for X11 (some require -I...)
-# PLATFORM_XT_LDFLAGS Platform LD options for X11 (some require -L...)
-# PLATFORM_XT_LIBS Platform libraries require with X11
-# PLATFORM_SSL_CPPFLAGS Platform CPP options for OpenSSL (may need -I...)
-# PLATFORM_SSL_LDFLAGS Platform LD options for OpenSSL (may need -L...)
-# PLATFORM_SSL_LIBS Platform libraries required with OpenSSL
-# PLATFORM_RAPI_CPPFLAGS Platform CPP options for RAPI
-# PLATFORM_RAPI_LDFLAGS Platform LD options for RAPI
-# PLATFORM_RAPI_LIBS Platform libraries required with RAPI
-# PLATFORM_SCTP_CPPFLAGS Platform CPP options required for SCTP
-# PLATFORM_SCTP_LDFLAGS Platform LD options required for SCTP
-# PLATFORM_SCTP_LIBS Platform libraries required for SCTP
+# PLATFORM_XT_CPPFLAGS
+# Platform CPP options for X11 (some require -I...)
+# PLATFORM_XT_LDFLAGS
+# Platform LD options for X11 (some require -L...)
+# PLATFORM_XT_LIBS
+# Platform libraries require with X11
+# PLATFORM_SSL_CPPFLAGS
+# Platform CPP options for OpenSSL (may need -I...)
+# PLATFORM_SSL_LDFLAGS
+# Platform LD options for OpenSSL (may need -L...)
+# PLATFORM_SSL_LIBS
+# Platform libraries required with OpenSSL
+# PLATFORM_RAPI_CPPFLAGS
+# Platform CPP options for RAPI
+# PLATFORM_RAPI_LDFLAGS
+# Platform LD options for RAPI
+# PLATFORM_RAPI_LIBS
+# Platform libraries required with RAPI
+# PLATFORM_SCTP_CPPFLAGS
+# Platform CPP options required for SCTP
+# PLATFORM_SCTP_LDFLAGS
+# Platform LD options required for SCTP
+# PLATFORM_SCTP_LIBS
+# Platform libraries required for SCTP
# PRELINK Executable to precede linking, such as quantify
# PURELINK If set, contains purify executable as well as all options
# PURE_CACHE_BASE_DIR
@@ -163,50 +174,66 @@
# (link to the appropriate platform-specific config file).
#----------------------------------------------------------------------------
-
-# Set the cleanup targets
-ifeq ($(CLEANUP_BIN),)
- ifneq ($(BIN),)
+# Set the cleanup targets. These targets are used by realclean even if
+# the component isn't being built, i.e., the decision to build it was based
+# on components built in another makefile and written a file (that might no
+# longer be available) and accessed by $(ACE_ROOT)/bin/ace_components.
+#
+# If a component should always be built, just use the normal BIN, LIB, or
+# SHLIB variables. If it's dependent on a component, use the BIN2 or
+# BIN_UNCHECKED variety, then assign that to BIN if the required component
+# is available.
+#
+# If you want to include multiple targets in a single Makefile, you must
+# create your own targets, e.g., server and client. In this case, assign
+# them to BIN, or BIN_UNCHECKED if they depend on other components, do not
+# include rules.bin.GNU. That way they will still get cleaned up.
+ifndef CLEANUP_BIN
+ ifdef BIN
CLEANUP_BIN = $(BIN)
else
- ifneq ($(BIN2),)
+ ifdef BIN2
CLEANUP_BIN = $(BIN2)
+ BIN_UNCHECKED = $(BIN2)
else
CLEANUP_BIN = $(BIN_UNCHECKED)
endif
endif
endif
-ifeq ($(CLEANUP_LIB),)
- ifneq ($(LIB),)
+ifndef CLEANUP_LIB
+ ifdef LIB
CLEANUP_LIB = $(LIB)
else
- ifneq ($(LIB2),)
+ ifdef LIB2
CLEANUP_LIB = $(LIB2)
+ LIB_UNCHECKED = $(LIB2)
else
CLEANUP_LIB = $(LIB_UNCHECKED)
endif
endif
endif
-ifeq ($(CLEANUP_SHLIB),)
- ifneq ($(SHLIB),)
+ifndef CLEANUP_SHLIB
+ ifdef SHLIB
CLEANUP_SHLIB = $(SHLIB)
else
- ifneq ($(SHLIB2),)
+ ifdef SHLIB2
CLEANUP_SHLIB = $(SHLIB2)
+ SHLIB_UNCHECKED = $(SHLIB2)
else
CLEANUP_SHLIB = $(SHLIB_UNCHECKED)
endif
endif
endif
-ifeq ($(CLEANUP_SHLIBA),)
- ifneq ($(SHLIBA),)
+ifndef CLEANUP_SHLIBA
+ ifdef SHLIBA
CLEANUP_SHLIBA = $(SHLIBA)
else
- ifneq ($(SHLIBA2),)
+ ifdef SHLIBA2
CLEANUP_SHLIBA = $(SHLIBA2)
+ SHLIBA2_UNCHECKED = $(SHLIBA2)
else
CLEANUP_SHLIBA = $(SHLIBA_UNCHECKED)
endif
@@ -215,10 +242,10 @@ endif
#### Default to building shared libraries only. Set it here to give the
#### platform a chance to override.
-ifeq ($(shared_libs),)
+ifndef shared_libs
shared_libs = 1
endif # shared_libs
-ifeq ($(static_libs),)
+ifndef static_libs
static_libs = 0
endif # static_libs
@@ -296,34 +323,41 @@ endif # versioned_so
# Platform-independent macro definitions
#----------------------------------------------------------------------------
+ifndef INCLDIRS
+ INCLDIRS ?=
+endif
+ifndef DEFFLAGS
+ DEFFLAGS ?=
+endif
+
CPPFLAGS += $(DEFFLAGS) $(INCLDIRS)
# Define default extentions for IDL-generated files
-ifeq ($(IDL_CLIENT_HDR_EXT),)
+ifndef IDL_CLIENT_HDR_EXT
IDL_CLIENT_HDR_EXT = C.h
endif
-ifeq ($(IDL_CLIENT_INL_EXT),)
+ifndef IDL_CLIENT_INL_EXT
IDL_CLIENT_INL_EXT = C.i
endif
-ifeq ($(IDL_CLIENT_SRC_EXT),)
+ifndef IDL_CLIENT_SRC_EXT
IDL_CLIENT_SRC_EXT = C.cpp
endif
-ifeq ($(IDL_SERVER_HDR_EXT),)
+ifndef IDL_SERVER_HDR_EXT
IDL_SERVER_HDR_EXT = S.h
endif
-ifeq ($(IDL_SERVER_INL_EXT),)
+ifndef IDL_SERVER_INL_EXT
IDL_SERVER_INL_EXT = S.i
endif
-ifeq ($(IDL_SERVER_SRC_EXT),)
+ifndef IDL_SERVER_SRC_EXT
IDL_SERVER_SRC_EXT = S.cpp
endif
-ifeq ($(IDL_SERVER_THDR_EXT),)
+ifndef IDL_SERVER_THDR_EXT
IDL_SERVER_THDR_EXT = S_T.h
endif
-ifeq ($(IDL_SERVER_TINL_EXT),)
+ifndef IDL_SERVER_TINL_EXT
IDL_SERVER_TINL_EXT = S_T.i
endif
-ifeq ($(IDL_SERVER_TSRC_EXT),)
+ifndef IDL_SERVER_TSRC_EXT
IDL_SERVER_TSRC_EXT = S_T.cpp
endif
@@ -435,6 +469,9 @@ ifneq ($(optimize),)
CCFLAGS += $(OCCFLAGS)
endif # optimize
+ifndef split
+ split = 0
+endif
ifeq ($(split),0)
override split =
endif # split
@@ -478,6 +515,9 @@ ifneq ($(xt_reactor),)
ACE_MAKE_OPTIONS += xt_reactor
endif # xt_reactor
+ifndef fl_reactor
+ fl_reactor ?=
+endif
ifeq ($(fl_reactor),0)
override fl_reactor =
endif # fl_reactor
@@ -491,6 +531,9 @@ ifneq ($(fl_reactor),)
ACE_MAKE_OPTIONS += rl_reactor
endif # fl_reactor
+ifndef tk_reactor
+ tk_reactor ?=
+endif
ifeq ($(tk_reactor),0)
override tk_reactor =
endif # tk_reactor
@@ -503,6 +546,9 @@ ifneq ($(tk_reactor),)
ACE_MAKE_OPTIONS += tk_reactor
endif # tk_reactor
+ifndef qt_reactor
+ qt_reactor ?=
+endif
ifeq ($(qt_reactor),0)
override qt_reactor =
endif # qt_reactor
@@ -515,12 +561,18 @@ ifneq ($(qt_reactor),)
ACE_MAKE_OPTIONS += qt_reactor
endif # qt_reactor
+ifndef QTDIR
+ QTDIR ?=
+endif
ifneq ($(QTDIR),)
MOC = ${QTDIR}/bin/moc
else
MOC = moc
endif
+ifndef gtk_reactor
+ gtk_reactor ?=
+endif
ifeq ($(gtk_reactor),0)
override gtk_reactor =
endif # gtk_reactor
@@ -533,6 +585,9 @@ ifneq ($(gtk_reactor),)
ACE_MAKE_OPTIONS += gtk_reactor
endif # gtk_reactor
+ifndef rapi
+ rapi ?=
+endif
ifeq ($(rapi),0)
override rapi =
endif #rapi
@@ -544,6 +599,9 @@ ifneq ($(rapi),)
ACE_MAKE_OPTIONS += rapi
endif # rapi
+ifdef sctp
+ sctp ?=
+endif
ifeq ($(sctp),0)
override sctp =
endif #rapi
@@ -556,6 +614,9 @@ ifneq ($(sctp),)
ACE_MAKE_OPTIONS += sctp
endif
+ifndef ace_with_gl
+ ace_with_gl ?=
+endif
ifeq ($(ace_with_gl),0)
override ace_with_gl =
endif # ace_with_gl
@@ -568,6 +629,9 @@ ifneq ($(ace_with_gl),)
ACE_MAKE_OPTIONS += ace_with_gl
endif # ace_with_gl
+ifndef ace_with_xll
+ ace_with_x11 ?=
+endif
ifeq ($(ace_with_x11),0)
override ace_with_x11 =
endif # ace_with_x11
@@ -579,9 +643,14 @@ ifneq ($(ace_with_x11),)
ACE_MAKE_OPTIONS += ace_with_x11
endif # ace_with_x11
+ifndef ssl
+ ssl ?=
+endif
ifeq ($(ssl),0)
override ssl =
-endif # ssl
+else
+ ACE_MAKE_OPTIONS += ssl
+endif
ifeq ($(exceptions),0)
ifeq ($(ACE_HAS_GNUG_PRE_2_8),0)
@@ -594,6 +663,9 @@ ifeq ($(exceptions),0)
endif # ! ACE_HAS_GNUG_PRE_2_8
else # exceptions
CPPFLAGS += -DACE_HAS_EXCEPTIONS
+ ifndef include_env
+ include_env ?=
+ endif
ifeq ($(include_env),1)
CPPFLAGS += -DACE_ENV_BKWD_COMPAT
endif
@@ -611,6 +683,9 @@ else # exceptions
ACE_MAKE_OPTIONS += exceptions
endif # exceptions
+ifndef profile
+ profile ?=
+endif
ifeq ($(profile),0)
override profile =
endif # profile
@@ -620,6 +695,9 @@ ifneq ($(profile),)
CCFLAGS += $(PCCFLAGS)
endif # profile
+ifndef inline
+ inline ?=
+endif
ifeq ($(inline),0)
CPPFLAGS += -DACE_NO_INLINE
else
@@ -635,9 +713,16 @@ ifeq ($(static_libs),0)
override static_libs =
endif # static_libs
+ifndef shared_libs_only
+ shared_libs_only ?=
+endif
ifeq ($(shared_libs_only),0)
override shared_libs_only =
endif # shared_libs_only
+
+ifndef static_libs_only
+ static_libs_only ?=
+endif
ifeq ($(static_libs_only),0)
override static_libs_only =
endif # static_libs_only
@@ -665,31 +750,9 @@ ifdef static_libs
ACE_MAKE_OPTIONS += static_libs
endif
-#### We need to set VBIN here, because it's used in the BUILD
-#### definitions below.
-VBIN = $(BIN:%=%$(VAR))
-
# These rules are here for backward compatibility, but are overwritten by the
# new all_in_one.GNU file.
ifdef shared_libs
- ifdef static_libs
- #### Build both shared and static libs.
- BUILD = $(IDL_SRC) $(VSHLIB) $(SHLIBA) $(VLIB) $(VBIN)
- else # ! static_libs
- #### Build shared libs only.
- ifeq ($(SHLIB),)
- #### Makefile only specifies static libs, so only build static libs.
- BUILD = $(IDL_SRC) $(VLIB) $(VBIN)
- else # ! SHLIB
- #### Don't build static libs.
- BUILD = $(IDL_SRC) $(VSHLIB) $(SHLIBA) $(VBIN)
- LIB =
-# ifndef VXWORKS
-# VDIR = $(VSHDIR)
-# endif # ! VXWORKS
- endif # SHLIB
- endif # static_libs
-
ifdef SHLIBA
LDLIBS := $(LDLIBS:-l%=-l%shr)
ACE_SHLIBS := $(ACE_SHLIBS:-l%=-l%shr)
@@ -697,15 +760,11 @@ ifdef shared_libs
else # ! shared_libs
ifdef static_libs
#### Don't build shared libs.
- BUILD = $(IDL_SRC) $(VLIB) $(VBIN)
PIC =
SHLIB =
SOEXT = o
VSHDIR = $(VDIR)
VLDLIBS = $(LDLIBS:%.so=%.o)
- else # ! static_libs
- #### Don't build any libs.
- BUILD = $(IDL_SRC) $(VBIN)
endif # static_libs
endif # shared_libs
@@ -718,6 +777,9 @@ endif # kylix
VLDLIBS = $(LDLIBS) $(ACELIB) $(LIBS)
+ifndef probe
+ probe ?=
+endif
ifeq ($(probe),0)
override probe =
endif # probe
@@ -726,14 +788,17 @@ ifeq ($(probe),1)
CPPFLAGS += -DACE_COMPILE_TIMEPROBES
endif # probe
+ifndef purify
+ purify ?=
+endif
ifeq ($(purify),0)
override purify =
endif # purify
+ifdef purify
PURE_CACHE_BASE_DIR = /tmp/purifycache
PURE_CACHE_DIR = $(PURE_CACHE_BASE_DIR)-$(LOGNAME)-$(notdir $(CXX) )
-ifdef purify
#### Pick up Purify directory from the users PATH.
ACE_PURIFY_DIR := \
$(shell type purify | sed -e 's/.* is //' -e 's%/purify$$%%')
@@ -747,6 +812,9 @@ ifdef purify
CPPFLAGS += -DACE_HAS_PURIFY -I$(ACE_PURIFY_DIR)
endif # purify
+ifndef quantify
+ quantify ?=
+endif
ifeq ($(quantify),0)
override quantify =
endif # quantify
@@ -768,6 +836,9 @@ ifdef quantify
endif # sparc
endif # quantify
+ifndef repo
+ repo ?=
+endif
ifeq ($(repo),0)
override repo =
endif # repo
@@ -781,7 +852,7 @@ ifdef repo
endif # repo
# If pipes is not set, we default to 0
-ifeq (,$(pipes))
+ifndef pipes
pipes = 0
endif
@@ -793,7 +864,7 @@ ifeq ($(pipes),1)
endif # pipes
# RMCast is turned on by default
-ifeq (,$(rmcast))
+ifndef rmcast
rmcast = 1
endif
@@ -801,21 +872,15 @@ ifeq ($(rmcast),1)
ACE_MAKE_OPTIONS += rmcast
endif
-# SSL is turned off by default
-ifeq (,$(ssl))
- ssl = 0
-endif
-
-ifeq ($(ssl),1)
- ACE_MAKE_OPTIONS += ssl
-endif
-
#----------------------------------------------------------------------------
# Conditional macro definitions
#----------------------------------------------------------------------------
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS) -c
+ifndef RC
+ RC ?=
+endif
COMPILE.rc = $(RC)
COMPILE-NO_DASH_G.cc = `echo $(COMPILE.cc) | sed 's/-g //'`
# 960905 Marius Kjeldahl <marius@funcom.com>