summaryrefslogtreecommitdiff
path: root/ACE/include/makeinclude/platform_aix_g++.GNU
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/include/makeinclude/platform_aix_g++.GNU
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/include/makeinclude/platform_aix_g++.GNU')
-rw-r--r--ACE/include/makeinclude/platform_aix_g++.GNU93
1 files changed, 93 insertions, 0 deletions
diff --git a/ACE/include/makeinclude/platform_aix_g++.GNU b/ACE/include/makeinclude/platform_aix_g++.GNU
new file mode 100644
index 00000000000..8700413e993
--- /dev/null
+++ b/ACE/include/makeinclude/platform_aix_g++.GNU
@@ -0,0 +1,93 @@
+# $Id$
+#
+# Platform macros for building on AIX with g++. This has been tested on
+# AIX 4.3 and 5 with gcc 3. Earlier versions of gcc may compile, but are
+# known to have serious problems on AIX.
+#
+# Contributed by Ian Wright <I.Wright@elsevier.co.uk>
+# Updated for AIX 4.3 and gcc 3 by Steve Huston <shuston@riverace.com>
+
+debug ?= 1
+distrib ?= 0
+exceptions ?= 1
+optimize ?= 1
+rtti ?= 1
+threads ?= 1
+buildbits ?= native
+with_ld ?= aix
+
+PLATFORM_XT_CPPFLAGS=
+PLATFORM_XT_LIBS=-lXt
+PLATFORM_XT_LDFLAGS=
+
+PLATFORM_X11_CPPFLAGS=
+PLATFORM_X11_LIBS=-lX11
+PLATFORM_X11_LDFLAGS=
+
+# Yes, believe it or not...
+# The way to make a shared lib on AIX is to make a shared object file and
+# then put that in an archive.
+# Non-shared archives are named lib<x>ns.a - ns = non-shared.
+SOEXT = a
+# aix_build turns on the funky shared library building code in
+# rules.lib.GNU
+aix_build = 1
+
+ifeq (0,$(rtti))
+ CFLAGS += -fno-rtti -DACE_LACKS_RTTI
+endif
+
+ifeq (1,$(threads))
+ CFLAGS += -pthread
+endif
+
+# In case anything here or in the config depends on OS version number,
+# grab it here and pass it all to the compiler as well.
+AIX_MAJOR_VERS := $(shell uname -v)
+AIX_MINOR_VERS := $(shell uname -r)
+AIX_VERS := $(AIX_MAJOR_VERS)0$(AIX_MINOR_VERS)
+
+CC = gcc
+CXX = g++
+
+CFLAGS += -W -Wall -mcpu=common -DACE_AIX_VERS=$(AIX_VERS)
+ifeq ($(buildbits),32)
+ CFLAGS += -m32
+endif
+ifeq ($(buildbits),64)
+ CFLAGS += -m64
+endif
+DCFLAGS += -g
+DLD = $(CXX)
+LD = $(CXX)
+# Linking TAO_IDL runs out of TOC space unless -bbigtoc is given to ld.
+# Don't do it for everything because it decreases run-time performance.
+ifeq ($(notdir $(shell pwd)), TAO_IDL)
+LDFLAGS += -Wl,-bbigtoc
+endif
+
+OCFLAGS = -O2
+OCCFLAGS = $(OCFLAGS)
+ifeq ($(threads),1)
+SOFLAGS += -pthread
+endif
+
+# AIX 5 has a new ld option, -bexpfull, that exports all the symbols that
+# g++ 3.3+ needs to work correctly. The new option is available by default
+# in AIX 5.2 and later, but must be installed by a patch to AIX 5.1.
+ifeq ($(AIX_MAJOR_VERS),5)
+SOFLAGS += -shared -Wl,-bexpfull # -Wl,-bloadmap:lib.map
+else
+SOFLAGS += -shared -Wl,-bexpall # -Wl,-bloadmap:lib.map
+endif
+
+LIBS += -lxti -ldl
+ARFLAGS = cruv
+RANLIB = ranlib
+
+# Test for template instantiation, add to SOFLAGS if versioned_so set,
+# add -E to LDFLAGS if using GNU ld
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)