intl/icu/source/config/mh-os390

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 ## -*-makefile-*-
michael@0 2 ## os/390, z/OS specific setup
michael@0 3 ## Copyright (c) 1999-2013, International Business Machines Corporation and
michael@0 4 ## others. All Rights Reserved.
michael@0 5
michael@0 6 ###################################################################
michael@0 7 # IMPORTANT NOTE #
michael@0 8 ###################################################################
michael@0 9 # Before you try to run the Makefile, make sure you have the #
michael@0 10 # environment variables set. #
michael@0 11 # #
michael@0 12 # If you are going to do the OS390BATCH build, make sure you have #
michael@0 13 # the OS390BATCH environment variable set. #
michael@0 14 # #
michael@0 15 # export OS390BATCH=1 #
michael@0 16 # #
michael@0 17 # To build a version of ICU that does not use IEEE Floating point #
michael@0 18 # #
michael@0 19 # export IEEE390=0 #
michael@0 20 # #
michael@0 21 # To build a version of ICU which uses a two data libraries #
michael@0 22 # where the smaller one is loaded first, use OS390_STUBDATA. #
michael@0 23 # USAGE OF THIS OPTION IS DEPRECATED. You should look into using #
michael@0 24 # Link Pack Area (LPA), library lookaside facility (LLA) or other #
michael@0 25 # z/OS options that enable page fault based loading of read-only #
michael@0 26 # code/data instead of this option. #
michael@0 27 # This option will be removed in a future version of ICU. #
michael@0 28 # #
michael@0 29 # export OS390_STUBDATA=1 #
michael@0 30 # #
michael@0 31 # To build a version of ICU which exploits the C/C++ compiler #
michael@0 32 # and runtime Extra Performance Linkage (XPLINK), specify #
michael@0 33 # #
michael@0 34 # export OS390_XPLINK=1 #
michael@0 35 # #
michael@0 36 ###################################################################
michael@0 37
michael@0 38 # TODO: Fix this configuration so that icu-config will work!
michael@0 39 # If statements don't work well when icu-config is generated.
michael@0 40 ifeq (${IEEE390},)
michael@0 41 IEEE390=1#M#
michael@0 42 endif
michael@0 43
michael@0 44 ifeq (${IEEE390}, 1)
michael@0 45 ICU_IEEE =#M#
michael@0 46 else
michael@0 47 ICU_IEEE = -Wc,'FLOAT(IEEE)' -DIEEE_754=0#M#
michael@0 48 endif
michael@0 49
michael@0 50 ## Additional flags when building libraries and with threads
michael@0 51 THREADSCPPFLAGS = -D_OPEN_THREADS
michael@0 52
michael@0 53 # For a dynamically called DLL module to share access to the POSIX external
michael@0 54 # variables, with its caller, the DLL module must define these _SHR_* macros.
michael@0 55 SHAREDLIBCPPFLAGS = -D_SHR_TZNAME -D_SHR_TIMEZONE
michael@0 56
michael@0 57 # -Wc,expo is used to export all functions
michael@0 58 SHAREDLIBCFLAGS = -Wc,expo
michael@0 59 SHAREDLIBCXXFLAGS = -Wc,expo
michael@0 60
michael@0 61 # TODO: Consider using -Wc,roc,ros for making the data and strings readonly
michael@0 62 # -Wc,"ros" seems to work, but not the "roc"
michael@0 63 # The RENT option makes the program reentrant. This may not really have the same
michael@0 64 # meaning as normal reentrancy on other platforms. See the z/OS documentation
michael@0 65 # for details. This is the default for C++, but not C.
michael@0 66 # The DLL option must be used by the callee and caller code when using shared libraries.
michael@0 67 # NOCSECT might be used as an optimization option.
michael@0 68 # -+ means accept any file extension as a C++ file. By default only .C is accepted.
michael@0 69 CFLAGS += -Wc,DLL,ROS,RENT,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'LANGLVL(EXTENDED)' $(ICU_IEEE)
michael@0 70 CXXFLAGS += -Wc,DLL,ROS,RTTI,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'LANGLVL(EXTENDED)' $(ICU_IEEE) -+
michael@0 71 ARFLAGS = -cr
michael@0 72
michael@0 73 # _MSE_PROTOS usually interacts with _XOPEN_SOURCE. It affects some standard
michael@0 74 # C functions that use wchar_t, and it selects behavior for
michael@0 75 # multibyte extension support (MSE) functions.
michael@0 76 #DEFS += -D_MSE_PROTOS
michael@0 77
michael@0 78 ifeq (${OS390_XPLINK}, 1)
michael@0 79 #SH# if [ "x$OS390_XPLINK" = "x1" ]; then
michael@0 80 # These lines must be the last options specified.
michael@0 81 # GOFF is is the strategic object module format for S/390. It is required for XPLINK.
michael@0 82 # NOTEMPINC could be used if ICU starts using templates.
michael@0 83 ICU_XPLINK_C = -Wc,'xplink(backchain,storeargs),goff'
michael@0 84 ICU_XPLINK_CXX = -Wc,'xplink(backchain,storeargs),goff' -Wc,'NOTEMPINC'
michael@0 85 ICU_XPLINK_L = -Wl,xplink
michael@0 86 #SH# fi
michael@0 87 endif
michael@0 88
michael@0 89 ## OS390BATCH
michael@0 90 ifeq (${OS390BATCH},1)
michael@0 91 DEFS += -DOS390BATCH#M#
michael@0 92 endif
michael@0 93
michael@0 94 ## Commands to generate dependency files
michael@0 95 GEN_DEPS.c= makedep
michael@0 96 GEN_DEPS.cc= makedep
michael@0 97
michael@0 98 ## Commands to compile
michael@0 99 # _CXX_STEPS="-1" is a prelink step when compiling C and C++, and
michael@0 100 # it's only needed for long function names
michael@0 101 COMPILE.c = $(COMPILE_LINK_ENVVAR) $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(ICU_XPLINK_C) -c
michael@0 102 COMPILE.cc = $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(ICU_XPLINK_CXX) -c
michael@0 103
michael@0 104 # Commands to link
michael@0 105 LINK.c= $(COMPILE_LINK_ENVVAR) $(CC) $(CFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
michael@0 106 LINK.cc= $(COMPILE_LINK_ENVVAR) $(CXX) $(CXXFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
michael@0 107
michael@0 108 ## Commands for shared library (dll)
michael@0 109 SHLIB.c= $(LINK.c)
michael@0 110 SHLIB.cc= $(LINK.cc)
michael@0 111
michael@0 112 ## Compiler switch to embed a runtime search path
michael@0 113 LD_RPATH= -I
michael@0 114
michael@0 115 ## Environment variable to set a runtime search path
michael@0 116 LDLIBRARYPATH_ENVVAR = LIBPATH
michael@0 117
michael@0 118 ## An import library (a.k.a. sidedeck) is needed for z/OS and MSVC
michael@0 119 IMPORT_LIB_EXT = .x
michael@0 120
michael@0 121 ## Versioned target for a shared library.
michael@0 122 FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
michael@0 123 MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
michael@0 124
michael@0 125 ## Versioned import library names.
michael@0 126 IMPORT_LIB = $(basename $(notdir $(SO_TARGET)))$(IMPORT_LIB_EXT)#M#
michael@0 127 MIDDLE_IMPORT_LIB = $(basename $(notdir $(MIDDLE_SO_TARGET)))$(IMPORT_LIB_EXT)#M#
michael@0 128 FINAL_IMPORT_LIB = $(basename $(notdir $(FINAL_SO_TARGET)))$(IMPORT_LIB_EXT)#M#
michael@0 129
michael@0 130 ## Non-shared intermediate object suffix
michael@0 131 STATIC_O = o
michael@0 132
michael@0 133 ifeq ($(OS390_STUBDATA),1)
michael@0 134 ## Suffix of the subset data library for dual common library support
michael@0 135 STUB_SUFFIX=_stub#M#
michael@0 136 DEFS += -DOS390_STUBDATA -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"#M#
michael@0 137 endif
michael@0 138
michael@0 139 ifeq ($(OS390BATCH),1)
michael@0 140 ## IXM is used as a name prefix for XML Toolkit, default value
michael@0 141 ifeq ($(PDS_NAME_PREFIX),)
michael@0 142 PDS_NAME_PREFIX= IXMI
michael@0 143 endif
michael@0 144 ifeq ($(OS390_STUBDATA),1)
michael@0 145 BATCH_STUB_TARGET= "//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}D1)'"
michael@0 146 BATCH_LIBICUDT= "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}D1)'"
michael@0 147 else
michael@0 148 BATCH_STUB_TARGET= "//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}DA)'"
michael@0 149 BATCH_LIBICUDT= "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}DA)'"
michael@0 150 PKGDATA_DEFS += -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"
michael@0 151 endif
michael@0 152
michael@0 153 BATCH_COMMON_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}UC)'"
michael@0 154 BATCH_I18N_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IN)'"
michael@0 155 BATCH_IO_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IO)'"
michael@0 156 BATCH_LAYOUT_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LE)'"
michael@0 157 BATCH_LAYOUTEX_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LX)'"
michael@0 158
michael@0 159 BATCH_LIBICUUC= "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}UC)'"
michael@0 160 BATCH_LIBICUI18N= "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IN)'"
michael@0 161 BATCH_LIBICUIO= "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IO)'"
michael@0 162 BATCH_LIBICULE= "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LE)'"
michael@0 163 BATCH_LIBICULX= "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LX)'"
michael@0 164 endif
michael@0 165
michael@0 166
michael@0 167 ## Link commands to link to ICU libs
michael@0 168 LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(STUB_SUFFIX)$(SO_TARGET_VERSION).x
michael@0 169 LIBICUUC= $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
michael@0 170 LIBICUI18N= $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
michael@0 171 LIBICULE= $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
michael@0 172 LIBICULX= $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
michael@0 173 LIBICUIO= $(top_builddir)/io/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
michael@0 174 LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)test$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
michael@0 175 LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/$(LIBICU)tu$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
michael@0 176
michael@0 177 ifneq (${ICUDATA_CHAR},e)
michael@0 178 #SH# if [ "$ICUDATA_CHAR" != "e" ]; then
michael@0 179 ## We're in ASCII mode.
michael@0 180 CFLAGS += -Wc,'ascii'
michael@0 181 CXXFLAGS += -Wc,'ascii'
michael@0 182 SO = so
michael@0 183 else
michael@0 184 #SH# else
michael@0 185 ## We're in EBCDIC mode.
michael@0 186 ## Shared object suffix
michael@0 187 SO = dll
michael@0 188 endif
michael@0 189 #SH# fi
michael@0 190
michael@0 191 ## Special 390 rules
michael@0 192
michael@0 193 ## Build archive from object
michael@0 194 %.a : $(OBJECTS)
michael@0 195 $(AR) $(ARFLAGS) $@ $(OBJECTS)
michael@0 196
michael@0 197 ## Compilation rules
michael@0 198 %.$(STATIC_O): $(srcdir)/%.c
michael@0 199 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
michael@0 200 %.o: $(srcdir)/%.c
michael@0 201 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
michael@0 202
michael@0 203 %.$(STATIC_O): $(srcdir)/%.cpp
michael@0 204 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
michael@0 205 %.o: $(srcdir)/%.cpp
michael@0 206 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
michael@0 207
michael@0 208 ## Dependency rules
michael@0 209 %.d : %.u
michael@0 210 @$(SHELL) -ec 'cat $< \
michael@0 211 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
michael@0 212 [ -s $@ ] || rm -f $@ ; rm -f $<'
michael@0 213
michael@0 214 %.u : $(srcdir)/%.c
michael@0 215 @echo "generating dependency information for $<"
michael@0 216 @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
michael@0 217 @$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
michael@0 218
michael@0 219 %.u : $(srcdir)/%.cpp
michael@0 220 @echo "generating dependency information for $<"
michael@0 221 @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
michael@0 222 @$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1'
michael@0 223
michael@0 224 ## Versioned libraries rules
michael@0 225 %$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
michael@0 226 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
michael@0 227 %.$(SO): %$(SO_TARGET_VERSION).$(SO)
michael@0 228 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
michael@0 229
michael@0 230 ## Install libraries as executable
michael@0 231 INSTALL-L=$(INSTALL_PROGRAM)
michael@0 232
michael@0 233 ## End 390-specific setup

mercurial