summaryrefslogtreecommitdiff
path: root/cpp/config/Make.rules.AIX
blob: 5da14db32deae5bb0a5deaea88e377b9de00ac4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

#
# This file is included by Make.rules when uname is AIX.
#

CXX			= xlC_r
CC			= xlc_r

XLC_COMPILER            = yes

#
# -qstaticinline: make inline functions that were not inlined (typically
# in debug mode or when the function is too big) static instead of
# extern (the default). This eliminates lots of "Duplicate symbol"
# warnings at link time, and surprisingly reduces the size of the
# libraries.
#
# -D_LARGE_FILES: By default, Berkeley DB is built with -D_LARGE_FILES,
# which moves a number of symbols from namespace std to namespace
# std::_LSF_ON. It would be nice to find a better solution, and get
# rid of this define.
#
# -qalign=natural: You should add this option if you plan to use or
# build Ice with libraries built with GCC. The default alignment for GCC
# is "natural", while the default for xlC is "power".
#

ifneq ($(OBJECT_MODE),64)
    CXXARCHFLAGS	+= -D_LARGE_FILES
endif

CXXFLAGS		= -brtl -qrtti=all -qstaticinline -qhalt=i $(CXXARCHFLAGS)

MAKEDEPENDFLAGS         = -qmakedep=gcc

ifeq ($(OPTIMIZE),yes)
     CXXFLAGS		+= -O2 -DNDEBUG -qinline -qmaxmem=65536
else
     CXXFLAGS		+= -g
endif

ifeq ($(embedded_runpath),yes)
    #
    # Our default for embedded runpath prefix on AIX is $(prefix)
    #
    ifeq ($(embedded_runpath_prefix),)
        embedded_runpath_prefix = $(prefix)
    endif
endif

#
# Note that this -blibpath is only useful for programs; for shared objects,
# such as libFreze.so.xx, it's only there "for info".
# When embedded_runpath_prefix and DB_HOME are both set, we embed DB_HOME/lib as
# well because icebox needs it to load successfully the IceStormService.
#
ifneq ($(embedded_runpath_prefix),)

    ifneq ($(DB_HOME),)
        runpath_libdir  = $(embedded_runpath_prefix)/$(libsubdir):$(DB_HOME)/$(libsubdir)
    else
        runpath_libdir  = $(embedded_runpath_prefix)/$(libsubdir)
    endif

    LDPLATFORMFLAGS     = -Wl,-blibpath:$(runpath_libdir):/usr/lib
else
    LDPLATFORMFLAGS	= -Wl,-blibpath:/usr/lib
endif

mklibfilename		= lib$(1).a

ifeq ($(STATICLIBS),)
	mklibname	= lib$(1).notused
else
	mklibname	= lib$(1).a
endif

mklibtargets		= $(1)

mkshlib			= $(CXX) -qmkshrobj $(LDFLAGS) -o $(2) $(3) $(4) ; ar -rc $(1) $(2) ; rm $(2)

mklib			= ar -rc $(1) $(2)

installlib		= $(INSTALL) $(2)/$(3) $(1)

BASELIBS		= -lIceUtil
LIBS			= -lIce $(BASELIBS)

ICONV_LIB               = -liconv

ICEUTIL_OS_LIBS		= -lcrypto
ICE_OS_LIBS		=