]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/config/mh-os390
ICU-511.25.tar.gz
[apple/icu.git] / icuSources / config / mh-os390
index c4a6913fe0ed96a9415ed8266b3165f65cd22b99..4c36656857f1a99582e06fe17417ad8968f2f8fd 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-makefile-*-
-## 390-specific setup 
-## Copyright (c) 1999-2004, International Business Machines Corporation and
+## os/390, z/OS specific setup 
+## Copyright (c) 1999-2012, International Business Machines Corporation and
 ## others. All Rights Reserved.
 
 ###################################################################
 #                                                                 #
 #   export OS390BATCH=1                                           #
 #                                                                 #
-# To build a version of ICU which uses IEEE Floating point        #
+# To build a version of ICU that does not use IEEE Floating point #
 #                                                                 #
-#   export IEEE390=1                                              #
+#   export IEEE390=0                                              #
 #                                                                 #
-# To build a version of ICU which uses a two common libraries     #
-# where the smaller one is loaded first.                          #
+# To build a version of ICU which uses a two data libraries       #
+# where the smaller one is loaded first, use OS390_STUBDATA.      #
+# USAGE OF THIS OPTION IS DEPRECATED. You should look into using  #
+# Link Pack Area (LPA), library lookaside facility (LLA) or other #
+# z/OS options that enable page fault based loading of read-only  #
+# code/data instead of this option.                               #
+# This option will be removed in a future version of ICU.         #
 #                                                                 #
 #   export OS390_STUBDATA=1                                       #
 #                                                                 #
 #                                                                 #
 ###################################################################
 
+# TODO: Fix this configuration so that icu-config will work!
+#       If statements don't work well when icu-config is generated.
 ifeq (${IEEE390},)
-IEEE390=1
+IEEE390=1#M#
 endif
 
 ifeq (${IEEE390}, 1)
-ICU_IEEE          = -Wc,"float(ieee)" -DIEEE_754=1
+ICU_IEEE          = -Wc,'FLOAT(IEEE)'
 else
-ICU_IEEE          = -DIEEE_754=0
+ICU_IEEE          = -Wc,'FLOAT(IEEE)' -DIEEE_754=0#M#
 endif
 
+## Additional flags when building libraries and with threads
+THREADSCPPFLAGS = -D_OPEN_THREADS
+
+# For a dynamically called DLL module to share access to the POSIX external
+# variables, with its caller, the DLL module must define these _SHR_* macros.
+SHAREDLIBCPPFLAGS      = -D_SHR_TZNAME -D_SHR_TIMEZONE
+
+# -Wc,expo is used to export all functions
+SHAREDLIBCFLAGS        = -Wc,expo
+SHAREDLIBCXXFLAGS      = -Wc,expo
+
 # TODO: Consider using  -Wc,roc,ros for making the data and strings readonly
 #       -Wc,"ros" seems to work, but not the "roc"
-CFLAGS          += -Wc,"langlvl(extended),spill(2000)" -Wc,"ros" $(ICU_BUILD_OPTIONS) $(ICU_IEEE) -Wc,dll,expo
-CXXFLAGS        += -Wc,"langlvl(extended),spill(2000)" -Wc,"ros" $(ICU_BUILD_OPTIONS) $(ICU_IEEE) -Wc,dll,expo
-DEFS            += -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_MSE_PROTOS -D_SHR_TZNAME -D_SHR_TIMEZONE -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"
+# The RENT option makes the program reentrant. This may not really have the same
+#       meaning as normal reentrancy on other platforms. See the z/OS documentation
+#       for details. This is the default for C++, but not C.
+# The DLL option must be used by the callee and caller code when using shared libraries.
+# NOCSECT might be used as an optimization option.
+# -+ means accept any file extension as a C++ file. By default only .C is accepted.
+CFLAGS          += -Wc,DLL,ROS,RENT,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'CHARS(SIGNED)','LANGLVL(EXTENDED)' $(ICU_IEEE)
+CXXFLAGS        += -Wc,DLL,ROS,RTTI,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'CHARS(SIGNED)','LANGLVL(EXTENDED)' $(ICU_IEEE) -+
+DEFS            += -D_XOPEN_SOURCE=600
 ARFLAGS         = -cr
 
-# TODO: Fix this configuration so that icu-config will work!
-#       This means we shouldn't be using so many of these special case defines.
+# _MSE_PROTOS usually interacts with _XOPEN_SOURCE. It affects some standard
+# C functions that use wchar_t, and it selects behavior for
+# multibyte extension support (MSE) functions.
+#DEFS            += -D_MSE_PROTOS
+
 ifeq (${OS390_XPLINK}, 1)
-# Note:  The following options require the PTF for PQ69418 on z/OS 1.2
-#        and later.
+#SH# if [ "x$OS390_XPLINK" = "x1" ]; then
 # These lines must be the last options specified.
-ICU_XPLINK_C      = -Wc,"xplink(backchain,storeargs)" -Wc,"GOFF,NOCSECT,RENT,SSCOMM" -Wc,"inline(auto,noreport,500,2500)"
-ICU_XPLINK_CPP    = -Wc,"xplink(backchain,storeargs)" -Wc,"GOFF,NOCSECT,NOTEMPINC" -Wc,"inline(auto,noreport,300,2500)"
-ICU_XPLINK_L      = -Wl,dll,xplink -Wl,EDIT=NO
+# GOFF is is the strategic object module format for S/390. It is required for XPLINK.
+# NOTEMPINC could be used if ICU starts using templates.
+ICU_XPLINK_C      = -Wc,'xplink(backchain,storeargs),goff'
+ICU_XPLINK_CXX    = -Wc,'xplink(backchain,storeargs),goff' -Wc,'NOTEMPINC'
+ICU_XPLINK_L      = -Wl,xplink
+#SH# fi
 endif
 
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
-DEFS            += -DOS390BATCH
+DEFS            += -DOS390BATCH#M#
 endif
 
-# Uncomment this line or do "gmake OS390_STUBDATA=1" to enable dual common library support
-#OS390_STUBDATA=1
-
-
 ## Commands to generate dependency files
 GEN_DEPS.c=    makedep                        
 GEN_DEPS.cc=   makedep
@@ -74,8 +99,8 @@ GEN_DEPS.cc=  makedep
 ## Commands to compile
 # _CXX_STEPS="-1" is a prelink step when compiling C and C++, and
 # it's only needed for long function names
-COMPILE.c       = $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(ICU_XPLINK_C) -c
-COMPILE.cc      = _CXX_CXXSUFFIX="cpp" $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(ICU_XPLINK_CPP) -c
+COMPILE.c       = $(COMPILE_LINK_ENVVAR) $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(ICU_XPLINK_C) -c
+COMPILE.cc      = $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(ICU_XPLINK_CXX) -c
 
 # Commands to link
 LINK.c=                $(COMPILE_LINK_ENVVAR) $(CC) $(CFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
@@ -99,43 +124,47 @@ FINAL_SO_TARGET=  $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
 MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
 
 ## Versioned import library names.
-IMPORT_LIB = $(basename $(notdir $(SO_TARGET)))$(IMPORT_LIB_EXT)
-MIDDLE_IMPORT_LIB = $(basename $(notdir $(MIDDLE_SO_TARGET)))$(IMPORT_LIB_EXT)
-FINAL_IMPORT_LIB = $(basename $(notdir $(FINAL_SO_TARGET)))$(IMPORT_LIB_EXT)
+IMPORT_LIB = $(basename $(notdir $(SO_TARGET)))$(IMPORT_LIB_EXT)#M#
+MIDDLE_IMPORT_LIB = $(basename $(notdir $(MIDDLE_SO_TARGET)))$(IMPORT_LIB_EXT)#M#
+FINAL_IMPORT_LIB = $(basename $(notdir $(FINAL_SO_TARGET)))$(IMPORT_LIB_EXT)#M#
 
-## Shared object suffix (switch to dll for shared library build)
-SO = dll
 ## Non-shared intermediate object suffix
 STATIC_O = o
 
 ifeq ($(OS390_STUBDATA),1)
 ## Suffix of the subset data library for dual common library support
-STUB_SUFFIX=_stub
-DEFS      += -DOS390_STUBDATA
+STUB_SUFFIX=_stub#M#
+DEFS      += -DOS390_STUBDATA -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"#M#
 endif
 
 ifeq ($(OS390BATCH),1)
+## IXM is used as a name prefix for XML Toolkit, default value
+ifeq ($(PDS_NAME_PREFIX),)
+PDS_NAME_PREFIX= IXMI
+endif
 ifeq ($(OS390_STUBDATA),1)
-BATCH_STUB_TARGET=     "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
-BATCH_LIBICUDT=                "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
+BATCH_STUB_TARGET=     "//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}D1)'"
+BATCH_LIBICUDT=                "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}D1)'"
 else
-BATCH_STUB_TARGET=     "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}DA)'"
-BATCH_LIBICUDT=                "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}DA)'"
+BATCH_STUB_TARGET=     "//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}DA)'"
+BATCH_LIBICUDT=                "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}DA)'"
+PKGDATA_DEFS        += -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"
 endif
 
-BATCH_COMMON_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}UC)'"
-BATCH_I18N_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}IN)'"
-BATCH_IO_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}IO)'"
-BATCH_LAYOUT_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}LE)'"
-BATCH_LAYOUTEX_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}LX)'"
-
-BATCH_LIBICUUC=                "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}UC)'"
-BATCH_LIBICUI18N=      "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}IN)'"
-BATCH_LIBICUIO=                "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}IO)'"
-BATCH_LIBICULE=                "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}LE)'"
-BATCH_LIBICULX=                "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}LX)'"
+BATCH_COMMON_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}UC)'"
+BATCH_I18N_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IN)'"
+BATCH_IO_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IO)'"
+BATCH_LAYOUT_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LE)'"
+BATCH_LAYOUTEX_TARGET="//'${LOADMOD}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LX)'"
+
+BATCH_LIBICUUC=                "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}UC)'"
+BATCH_LIBICUI18N=      "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IN)'"
+BATCH_LIBICUIO=                "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}IO)'"
+BATCH_LIBICULE=                "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LE)'"
+BATCH_LIBICULX=                "//'${LOADEXP}(${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}LX)'"
 endif
 
+
 ## Link commands to link to ICU libs
 LIBICUDT=      $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(STUB_SUFFIX)$(SO_TARGET_VERSION).x
 LIBICUUC=      $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
@@ -146,6 +175,20 @@ LIBICUIO=  $(top_builddir)/io/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
 LIBCTESTFW=    $(top_builddir)/tools/ctestfw/$(LIBICU)test$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
 LIBICUTOOLUTIL=        $(top_builddir)/tools/toolutil/$(LIBICU)tu$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
 
+ifneq (${ICUDATA_CHAR},e)
+#SH# if [ "$ICUDATA_CHAR" != "e" ]; then
+## We're in ASCII mode.
+CFLAGS         += -Wc,'ascii'
+CXXFLAGS       += -Wc,'ascii'
+SO = so
+else
+#SH# else
+## We're in EBCDIC mode.
+## Shared object suffix
+SO = dll
+endif
+#SH# fi
+
 ## Special 390 rules
 
 ## Build archive from object