## -*-makefile-*-
-## 390-specific setup
-## Copyright (c) 1999-2004, International Business Machines Corporation and
+## os/390, z/OS specific setup
+## Copyright (c) 1999-2006, International Business Machines Corporation and
## others. All Rights Reserved.
###################################################################
# #
###################################################################
+# 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 = -DIEEE_754=0#M#
endif
+# 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
+
+## Additional flags when building libraries and with threads
+THREADSCPPFLAGS = -D_OPEN_THREADS
+
+# -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)\"
+# -+ means accept any file extension as a C++ file. By default only .C is accepted.
+CFLAGS += -Wc,'langlvl(extended),spill(2000),ros,dll' $(ICU_IEEE)
+CXXFLAGS += -Wc,'langlvl(extended),spill(2000),ros,dll' $(ICU_IEEE) -+
+DEFS += -D_XOPEN_SOURCE_EXTENDED -D_MSE_PROTOS
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.
ifeq (${OS390_XPLINK}, 1)
+#SH# if [ "x$OS390_XPLINK" = "x1" ]; then
# Note: The following options require the PTF for PQ69418 on z/OS 1.2
# and later.
# 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_C = -Wc,'xplink(backchain,storeargs)' -Wc,'GOFF,NOCSECT,RENT'
+ICU_XPLINK_CPP = -Wc,'xplink(backchain,storeargs)' -Wc,'GOFF,NOCSECT,NOTEMPINC'
ICU_XPLINK_L = -Wl,dll,xplink -Wl,EDIT=NO
+#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
# _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.cc = $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(ICU_XPLINK_CPP) -c
# Commands to link
LINK.c= $(COMPILE_LINK_ENVVAR) $(CC) $(CFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
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)
else
BATCH_STUB_TARGET= "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}DA)'"
BATCH_LIBICUDT= "//'${LOADEXP}(IXMI${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)'"
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