summaryrefslogtreecommitdiff
path: root/include/makeinclude
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-09 01:43:03 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-09 01:43:03 +0000
commit2a24705bc4e886e079605e5ad4cba70c680e9d34 (patch)
tree420161a6349b8b99c1a1270ca9dc15b8e22b1466 /include/makeinclude
parent2f6bae3887fa3ad28ba7cbfe2bc519fc2561c523 (diff)
downloadATCD-2a24705bc4e886e079605e5ad4cba70c680e9d34.tar.gz
ChangeLogTag:Mon Dec 8 19:44:04 UTC 2003 Don Hinton <dhinton@dresystems.com>
Diffstat (limited to 'include/makeinclude')
-rw-r--r--include/makeinclude/rules.bin.GNU11
-rw-r--r--include/makeinclude/rules.lib.GNU35
-rw-r--r--include/makeinclude/rules.local.GNU45
-rw-r--r--include/makeinclude/rules.nested.GNU16
-rw-r--r--include/makeinclude/wrapper_macros.GNU120
5 files changed, 168 insertions, 59 deletions
diff --git a/include/makeinclude/rules.bin.GNU b/include/makeinclude/rules.bin.GNU
index 8b37c6bcaf6..0f45b83db8c 100644
--- a/include/makeinclude/rules.bin.GNU
+++ b/include/makeinclude/rules.bin.GNU
@@ -28,12 +28,15 @@ 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))
+ifndef CHORUSLINK
+ CHORUSLINK ?=
+endif # CHORUSLINK
+ifndef using_aix_vacpp
+ using_aix_vacpp ?=
+endif
+
ifeq ($(CHORUSLINK),true)
$(BIN): %: $(VDIR)%.$(OBJEXT) $(VOBJS)
$(LINK.cc) $(CC_OUTPUT_FLAG) $@ $(sort $(VDIR)$@.$(OBJEXT) $(VOBJS)) $(VLDLIBS) $(LDFLAGS) $(POSTLINK)
diff --git a/include/makeinclude/rules.lib.GNU b/include/makeinclude/rules.lib.GNU
index 5679f4a600f..4c7a8fb20ee 100644
--- a/include/makeinclude/rules.lib.GNU
+++ b/include/makeinclude/rules.lib.GNU
@@ -7,6 +7,30 @@
# Requires GNU make
#----------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Library versioning
+#---------------------------------------------------------------------------
+
+ifeq ($(versioned_so),1)
+ # Turn on symbol versioning. The scheme that we follow is to allow
+ # applications dependent on libraries, with same version numbers (major,
+ # minor and beta) to run, but applications with dependencies on libraries
+ # with different minor or major or beta versions to fail.
+ #
+ # Version number of the libraries
+ #
+ ifeq ($(SOVERSION),)
+ SOVERSION = .$(ACE_MAJOR_VERSION).$(ACE_MINOR_VERSION).$(ACE_BETA_VERSION)
+ endif # SOVERSION
+
+ # Name that will be written into the dynamic library
+ #
+ ifeq ($(SONAME),)
+ SONAME = $(SHLIB)$(SOVERSION)
+ endif # SONAME
+endif # versioned_so
+
+
#----------------------------------------------------------------------------
# The following targets arrange to build both unshared and shared libraries
#----------------------------------------------------------------------------
@@ -54,11 +78,6 @@ ifeq ($(VLIBS),)
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)
@@ -82,12 +101,6 @@ ifdef shared_libs
endif
endif # shared_libs
-# Alzays 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
-# installation.
-INSTALL += $(LIB_INSTALL)
-$(LIB_INSTALL): $(VLIBS)
ifndef ace_lib_prelink
ace_lib_prelink = 0
diff --git a/include/makeinclude/rules.local.GNU b/include/makeinclude/rules.local.GNU
index 38228fdef87..2a31b112b2b 100644
--- a/include/makeinclude/rules.local.GNU
+++ b/include/makeinclude/rules.local.GNU
@@ -7,6 +7,7 @@
# Requires GNU make
#----------------------------------------------------------------------------
+
CLEANUP_OBJDIRS =
CLEANUP_DIRS =
@@ -62,6 +63,8 @@ ifndef VBIN
ifdef BIN
VBIN = $(BIN:%=%$(VAR))
$(VBIN): $(VLIBS)
+ else
+ VBIN ?=
endif
endif
@@ -186,8 +189,6 @@ endif
# Library generation targets
#----------------------------------------------------------------------------
-.PRECIOUS: $(VLIB)
-
#### show_statics shows static objects in locally-created object files.
#### It assumes that the object files were built using g++.
#### TOOLENV selects the proper nm in VxWorks host environments.
@@ -206,11 +207,28 @@ 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
+
+# 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
+# installation.
+INSTALL += $(LIB_INSTALL)
+$(LIB_INSTALL): $(VLIBS)
+
install.local: $(INSTALL)
deinstall.local:
-ifneq ($(CLEANUP_INSTALL),)
+ifdef CLEANUP_INSTALL
+ ifneq ($(CLEANUP_INSTALL),)
$(RM) $(CLEANUP_INSTALL)
+ endif # CLEANUP_INSTALL
endif # CLEANUP_INSTALL
ifndef LN_S
@@ -275,12 +293,18 @@ ifdef IDL_FILES
-$(RM) $(foreach ext, $(IDL_EXT), $(addsuffix $(ext), $(IDL_FILES)))
endif
+ifdef CLEANUP_BIN
+ CLEANUP_BIN ?=
+endif # CLEANUP_BIN
ifneq ($(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
ifdef static_libs
+ ifdef CLEANUP_LIB
+ CLEANUP_LIB ?=
+ endif # CLEANUP_LIB
ifneq ($(CLEANUP_LIB),)
DO_CLEANUP = 1
REALCLEAN_FILES += $(CLEANUP_LIB:%=%) $(CLEANUP_LIB:%=%_debug) $(CLEANUP_LIB:%=%_profile) $(CLEANUP_LIB:%=%_optimize)
@@ -288,15 +312,23 @@ ifdef static_libs
endif # static_libs
ifdef shared_libs
+ ifdef CLEANUP_SHLIB
+ CLEANUP_SHLIB ?=
+ endif
ifneq ($(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
endif # shared_libs
-CLEANUP_OBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(SRC)))))
CLEANUP_OBJS += $(addsuffix .o, $(addprefix $(VDIR),$(CLEANUP_BIN)))
-CLEANUP_OBJS += $(addsuffix .$(OBJEXT),$(addprefix $(VSHDIR),$(basename $(notdir $(LSRC)))))
+
+ifdef SRC
+ CLEANUP_OBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(SRC)))))
+endif # SRC
+ifdef LSRC
+ CLEANUP_OBJS += $(addsuffix .$(OBJEXT),$(addprefix $(VSHDIR),$(basename $(notdir $(LSRC)))))
+endif # LSRC
clean.local: makefile_name.local
ifdef DO_CLEANUP
@@ -394,12 +426,14 @@ ifndef IDL_CLIENT_HDR_EXT
endif
idl_stubs.local: $(foreach file, $(IDL_FILES), $(file)$(IDL_CLIENT_HDR_EXT))
+ifdef $(TAO_IDL_DEP)
$(TAO_IDL_DEP):
@if test ! -s $(TAO_IDL_DEP); then \
echo " ***"; \
echo " *** ERROR: $(TAO_IDL_DEP) not found."; \
echo " ***"; \
echo; /bin/false; fi
+endif # TAO_IDL_DEP
#----------------------------------------------------------------------------
# RCS info target
@@ -429,3 +463,4 @@ SPLIT:
@echo "Splitting source files..."
@$(ACE_ROOT)/bin/split-cpp -s Svc_Conf_l.cpp -s Svc_Conf_y.cpp $(LSRC)
@echo "done."
+
diff --git a/include/makeinclude/rules.nested.GNU b/include/makeinclude/rules.nested.GNU
index e5263b82b59..ac864a595c0 100644
--- a/include/makeinclude/rules.nested.GNU
+++ b/include/makeinclude/rules.nested.GNU
@@ -1,3 +1,5 @@
+# -*- Makefile -*-
+
#----------------------------------------------------------------------------
# $Id$
#
@@ -8,10 +10,16 @@
# 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
@@ -20,6 +28,10 @@ endif
# 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
+
ifeq ($(DIRS_PARALLEL),)
.NOTPARALLEL:
endif
@@ -38,6 +50,8 @@ endif
# real target to build in the SUBDIR_TARGET variable.
$(TARGETS_NESTED):
-ifneq ($(DIRS),)
+ifdef DIRS
+ ifneq ($(DIRS),)
$(MAKE) -f $(MAKEFILE) SUBDIR_TARGET=$(@:.nested=) $(addsuffix .subdir, $(DIRS))
+ endif # DIRS
endif # DIRS
diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU
index 4dcbbc353e4..eae746422f0 100644
--- a/include/makeinclude/wrapper_macros.GNU
+++ b/include/makeinclude/wrapper_macros.GNU
@@ -192,41 +192,56 @@
ifndef CLEANUP_BIN
ifdef BIN
CLEANUP_BIN = $(BIN)
- else
+ else # !BIN
ifdef BIN2
CLEANUP_BIN = $(BIN2)
BIN_UNCHECKED = $(BIN2)
- else
- CLEANUP_BIN = $(BIN_UNCHECKED)
- endif
- endif
-endif
+ else # !BIN2
+ ifdef BIN_UNCHECKED
+ CLEANUP_BIN = $(BIN_UNCHECKED)
+ else # !BIN_UNCHECKED
+ BIN_UNCHECKED ?=
+ CLEANUP_BIN ?=
+ endif # BIN_UNCHECKED
+ endif # BIN2
+ endif # BIN
+endif # CLEANUP_BIN
ifndef CLEANUP_LIB
ifdef LIB
CLEANUP_LIB = $(LIB)
- else
+ else # !LIB
ifdef LIB2
CLEANUP_LIB = $(LIB2)
LIB_UNCHECKED = $(LIB2)
- else
- CLEANUP_LIB = $(LIB_UNCHECKED)
- endif
- endif
-endif
+ else # !LIB2
+ ifdef LIB_UNCHECKED
+ CLEANUP_LIB = $(LIB_UNCHECKED)
+ else # !LIB_UNCHECKED
+ LIB_UNCHECKED ?=
+ CLEANUP_LIB ?=
+ endif # LIB_UNCHECKED
+ endif # LIB2
+ endif # LIB
+endif # CLEANUP_LIB
ifndef CLEANUP_SHLIB
ifdef SHLIB
CLEANUP_SHLIB = $(SHLIB)
- else
+ else # !SHLIB
ifdef SHLIB2
CLEANUP_SHLIB = $(SHLIB2)
SHLIB_UNCHECKED = $(SHLIB2)
- else
- CLEANUP_SHLIB = $(SHLIB_UNCHECKED)
- endif
- endif
-endif
+ else # !SHLIB2
+ ifdef SHLIB_UNCHECKED
+ CLEANUP_SHLIB = $(SHLIB_UNCHECKED)
+ else # ! SHLIB_UNCHECKED
+ SHLIB_UNCHECKED ?=
+ CLEANUP_SHLIB ?=
+ endif # SHLIB_UNCHECKED
+ endif # SHLIB_UNCHECKED
+ endif # SHLIB
+endif # CLEANUP_SHLIB
ifndef CLEANUP_SHLIBA
ifdef SHLIBA
@@ -263,10 +278,26 @@ ifndef PACE_ROOT
PACE_ROOT = $(ACE_ROOT)/PACE
endif # PACE_ROOT
+# Define some variables to silence warnings
+ifndef SHR_FILTER
+ SHR_FILTER ?=
+endif # 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
+
# $(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.
@@ -301,24 +332,12 @@ endif
ifeq (,$(versioned_so))
versioned_so = 1
endif
-ifeq ($(versioned_so),1)
- # Turn on symbol versioning. The scheme that we follow is to allow
- # applications dependent on libraries, with same version numbers (major,
- # minor and beta) to run, but applications with dependencies on libraries
- # with different minor or major or beta versions to fail.
- #
- # Version number of the libraries
- #
- ifndef SOVERSION
- SOVERSION = .$(ACE_MAJOR_VERSION).$(ACE_MINOR_VERSION).$(ACE_BETA_VERSION)
- endif # SOVERSION
-
- # Name that will be written into the dynamic library
- #
- ifndef SONAME
- SONAME = $(SHLIB)$(SOVERSION)
- endif # SONAME
-endif # versioned_so
+ifndef SOVERSION
+ SOVERSION ?=
+endif # SOVERSION
+ifndef SONAME
+ SONAME ?=
+endif
#----------------------------------------------------------------------------
# Platform-independent macro definitions
@@ -382,6 +401,10 @@ ifeq (,$(findstring -L$(ACE_ROOT)/ace,$(LDFLAGS)))
endif
LEX = flex
+ifndef EXEEXT
+ EXEEXT ?=
+endif
+
ifndef COMSPEC
ifdef ComSpec
#### ACE+TAO use COMSPEC, but ComSpec is defined.
@@ -751,8 +774,10 @@ ifdef static_libs
ACE_MAKE_OPTIONS += static_libs
endif
-# These rules are here for backward compatibility, but are overwritten by the
-# new all_in_one.GNU file.
+ifndef ACE_SHLIBS
+ ACE_SHLIBS ?=
+endif # ACE_SHLIBS
+
ifdef shared_libs
ifdef SHLIBA
LDLIBS := $(LDLIBS:-l%=-l%shr)
@@ -882,6 +907,25 @@ 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
+
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS) -c
ifndef RC