1999-09-03 22:08:47 +00:00
|
|
|
## -*-makefile-*-
|
1999-08-16 21:50:52 +00:00
|
|
|
## 390-specific setup
|
2003-06-02 22:12:03 +00:00
|
|
|
## Copyright (c) 1999-2003, International Business Machines Corporation and
|
2000-01-17 19:48:20 +00:00
|
|
|
## others. All Rights Reserved.
|
2000-10-16 18:05:34 +00:00
|
|
|
##
|
2003-09-26 00:05:51 +00:00
|
|
|
## $Id: mh-os390,v 1.57 2003/09/26 00:05:51 grhoten-oss Exp $
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-12-30 00:25:32 +00:00
|
|
|
###################################################################
|
|
|
|
# IMPORTANT NOTE #
|
|
|
|
###################################################################
|
|
|
|
# Before you try to run the Makefile, make sure you have the #
|
|
|
|
# environment variables set. #
|
|
|
|
# #
|
|
|
|
# If you are going to do the OS390BATCH build, make sure you have #
|
|
|
|
# the OS390BATCH environment variable set. #
|
|
|
|
# #
|
|
|
|
# export OS390BATCH=1 #
|
|
|
|
# #
|
|
|
|
# To build a version of ICU which uses IEEE Floating point #
|
|
|
|
# #
|
|
|
|
# export IEEE390=1 #
|
|
|
|
# #
|
2002-05-24 17:44:00 +00:00
|
|
|
# To build a version of ICU which uses a two common libraries #
|
|
|
|
# where the smaller one is loaded first. #
|
|
|
|
# #
|
|
|
|
# export OS390_STUBDATA=1 #
|
|
|
|
# #
|
2003-05-23 02:36:44 +00:00
|
|
|
# To build a version of ICU which exploits the C/C++ compiler #
|
|
|
|
# and runtime Extra Performance Linkage (XPLINK), specify #
|
|
|
|
# #
|
|
|
|
# export OS390_XPLINK=1 #
|
|
|
|
# #
|
1999-12-30 00:25:32 +00:00
|
|
|
###################################################################
|
|
|
|
|
2003-05-27 16:47:59 +00:00
|
|
|
ifeq (${IEEE390},)
|
|
|
|
IEEE390=1
|
|
|
|
endif
|
|
|
|
|
1999-12-30 00:25:32 +00:00
|
|
|
ifeq (${IEEE390}, 1)
|
2000-04-06 16:45:03 +00:00
|
|
|
ICU_IEEE = -Wc,"float(ieee)" -DIEEE_754=1
|
1999-12-30 00:25:32 +00:00
|
|
|
else
|
2000-04-06 16:45:03 +00:00
|
|
|
ICU_IEEE = -DIEEE_754=0
|
1999-12-30 00:25:32 +00:00
|
|
|
endif
|
|
|
|
|
2003-06-02 22:12:03 +00:00
|
|
|
# TODO: Consider using -Wc,roc,ros for making the data and strings readonly
|
|
|
|
# -Wc,"ros" seems to work, but not the "roc"
|
2003-06-04 18:12:51 +00:00
|
|
|
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
|
2003-05-27 16:47:59 +00:00
|
|
|
DEFS += -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_MSE_PROTOS -D_SHR_TZNAME -D_SHR_TIMEZONE -DU_LIBICUDATA_NAME=\"$(ICUDATA_NAME)\"
|
|
|
|
ARFLAGS = -cr
|
|
|
|
|
2003-06-02 22:12:03 +00:00
|
|
|
# TODO: Fix this configuration so that icu-config will work!
|
|
|
|
# This means we shouldn't be using so many of these special case defines.
|
2003-05-23 02:36:44 +00:00
|
|
|
ifeq (${OS390_XPLINK}, 1)
|
|
|
|
# Note: The following options require the PTF for PQ69418 on z/OS 1.2
|
|
|
|
# and later.
|
2003-05-27 16:47:59 +00:00
|
|
|
# These lines must be the last options specified.
|
2003-06-02 22:12:03 +00:00
|
|
|
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
|
2003-05-23 02:36:44 +00:00
|
|
|
endif
|
|
|
|
|
1999-12-30 00:25:32 +00:00
|
|
|
## OS390BATCH
|
|
|
|
ifeq (${OS390BATCH},1)
|
2002-06-24 19:49:13 +00:00
|
|
|
DEFS += -DOS390BATCH
|
1999-12-30 00:25:32 +00:00
|
|
|
endif
|
2002-05-23 23:09:19 +00:00
|
|
|
|
|
|
|
# Uncomment this line or do "gmake OS390_STUBDATA=1" to enable dual common library support
|
|
|
|
#OS390_STUBDATA=1
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Commands to generate dependency files
|
|
|
|
GEN_DEPS.c= makedep
|
|
|
|
GEN_DEPS.cc= makedep
|
|
|
|
|
|
|
|
## Commands to compile
|
2002-06-27 20:42:48 +00:00
|
|
|
# _CXX_STEPS="-1" is a prelink step when compiling C and C++, and
|
|
|
|
# it's only needed for long function names
|
2003-06-02 22:12:03 +00:00
|
|
|
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
|
2002-06-24 19:49:13 +00:00
|
|
|
|
2001-10-29 22:41:44 +00:00
|
|
|
# Commands to link
|
2003-06-02 22:12:03 +00:00
|
|
|
LINK.c= $(COMPILE_LINK_ENVVAR) $(CC) $(CFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
|
|
|
|
LINK.cc= $(COMPILE_LINK_ENVVAR) $(CXX) $(CXXFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
|
2001-10-29 22:41:44 +00:00
|
|
|
|
1999-09-03 22:08:47 +00:00
|
|
|
## Commands for shared library (dll)
|
2002-06-27 20:42:48 +00:00
|
|
|
SHLIB.c= $(LINK.c)
|
|
|
|
SHLIB.cc= $(LINK.cc)
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
## Compiler switch to embed a runtime search path
|
|
|
|
LD_RPATH= -I
|
|
|
|
|
2001-11-09 18:09:54 +00:00
|
|
|
## Environment variable to set a runtime search path
|
|
|
|
LDLIBRARYPATH_ENVVAR = LIBPATH
|
|
|
|
|
2003-03-19 01:56:39 +00:00
|
|
|
## An import library (a.k.a. sidedeck) is needed for z/OS and MSVC
|
2003-03-21 01:12:29 +00:00
|
|
|
IMPORT_LIB_EXT = .x
|
2003-03-19 01:56:39 +00:00
|
|
|
|
2000-09-15 05:07:43 +00:00
|
|
|
## Versioned target for a shared library.
|
2003-03-21 01:12:29 +00:00
|
|
|
FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
|
|
|
|
MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
|
2000-09-15 05:07:43 +00:00
|
|
|
|
2003-03-19 01:56:39 +00:00
|
|
|
## Versioned import library names.
|
2003-04-10 17:42:21 +00:00
|
|
|
IMPORT_LIB = $(basename $(SO_TARGET))$(IMPORT_LIB_EXT)
|
|
|
|
MIDDLE_IMPORT_LIB = $(basename $(MIDDLE_SO_TARGET))$(IMPORT_LIB_EXT)
|
|
|
|
FINAL_IMPORT_LIB = $(basename $(FINAL_SO_TARGET))$(IMPORT_LIB_EXT)
|
2003-03-19 01:56:39 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
## Shared object suffix (switch to dll for shared library build)
|
2001-11-06 22:19:17 +00:00
|
|
|
SO = dll
|
2000-10-09 19:06:57 +00:00
|
|
|
## Non-shared intermediate object suffix
|
|
|
|
STATIC_O = o
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2002-05-21 22:41:42 +00:00
|
|
|
ifeq ($(OS390_STUBDATA),1)
|
2002-05-24 17:44:00 +00:00
|
|
|
## Suffix of the subset data library for dual common library support
|
2002-05-24 17:53:42 +00:00
|
|
|
STUB_SUFFIX=_stub
|
2002-07-27 07:58:30 +00:00
|
|
|
DEFS += -DOS390_STUBDATA
|
2002-05-21 22:41:42 +00:00
|
|
|
endif
|
2001-11-07 22:53:23 +00:00
|
|
|
|
2002-05-21 22:41:42 +00:00
|
|
|
ifeq ($(OS390BATCH),1)
|
2002-07-27 07:58:30 +00:00
|
|
|
ifeq ($(OS390_STUBDATA),1)
|
2001-12-05 17:46:30 +00:00
|
|
|
BATCH_STUB_TARGET= "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
|
|
|
|
BATCH_LIBICUDT= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
|
2002-07-27 07:58:30 +00:00
|
|
|
else
|
|
|
|
BATCH_STUB_TARGET= "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}DA)'"
|
|
|
|
BATCH_LIBICUDT= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}DA)'"
|
|
|
|
endif
|
2002-08-12 20:30:23 +00:00
|
|
|
|
|
|
|
BATCH_COMMON_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}UC)'"
|
2003-09-26 00:05:51 +00:00
|
|
|
BATCH_I18N_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}IN)'"
|
2002-08-12 20:30:23 +00:00
|
|
|
BATCH_USTDIO_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}IO)'"
|
2003-09-26 00:05:51 +00:00
|
|
|
BATCH_LAYOUT_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}LE)'"
|
|
|
|
BATCH_LAYOUTEX_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}LX)'"
|
2002-08-12 20:30:23 +00:00
|
|
|
|
2002-07-27 07:58:30 +00:00
|
|
|
BATCH_LIBICUUC= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}UC)'"
|
|
|
|
BATCH_LIBICUI18N= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}IN)'"
|
|
|
|
BATCH_LIBICUSTDIO= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}IO)'"
|
|
|
|
BATCH_LIBICULE= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}LE)'"
|
2003-04-24 21:00:36 +00:00
|
|
|
BATCH_LIBICULX= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}LX)'"
|
2001-11-07 22:53:23 +00:00
|
|
|
endif
|
2001-11-06 22:19:17 +00:00
|
|
|
|
1999-09-03 22:08:47 +00:00
|
|
|
## Link commands to link to ICU libs
|
2002-05-23 23:09:19 +00:00
|
|
|
LIBICUDT= $(top_builddir)/stubdata/lib$(ICUPREFIX)data$(ICULIBSUFFIX)$(STUB_SUFFIX)$(SO_TARGET_VERSION).x
|
2002-05-21 22:41:42 +00:00
|
|
|
LIBICUUC= $(top_builddir)/common/lib$(ICUPREFIX)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICUI18N= $(top_builddir)/i18n/lib$(ICUPREFIX)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICULE= $(top_builddir)/layout/lib$(ICUPREFIX)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
2003-04-24 21:00:36 +00:00
|
|
|
LIBICULX= $(top_builddir)/layoutex/lib$(ICUPREFIX)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
2002-05-21 22:41:42 +00:00
|
|
|
LIBCTESTFW= $(top_builddir)/tools/ctestfw/lib$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/lib$(ICUPREFIX)toolutil$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
2003-05-30 00:00:22 +00:00
|
|
|
LIBUSTDIO= $(top_builddir)/extra/ustdio/libicuio$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
1999-09-03 22:08:47 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
## Special 390 rules
|
|
|
|
|
|
|
|
## Build archive from object
|
|
|
|
%.a : $(OBJECTS)
|
|
|
|
$(AR) $(ARFLAGS) $@ $(OBJECTS)
|
|
|
|
|
|
|
|
## Compilation rules
|
2000-10-09 19:06:57 +00:00
|
|
|
%.$(STATIC_O): $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
## Dependency rules
|
|
|
|
%.d : %.u
|
|
|
|
@$(SHELL) -ec 'cat $< \
|
|
|
|
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@ ; rm -f $<'
|
|
|
|
|
|
|
|
%.u : $(srcdir)/%.c
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
1999-08-16 21:50:52 +00:00
|
|
|
@$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
|
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
|
|
|
|
|
|
|
|
%.u : $(srcdir)/%.cpp
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
1999-08-16 21:50:52 +00:00
|
|
|
@$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
|
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1'
|
|
|
|
|
2001-10-03 23:32:12 +00:00
|
|
|
## Versioned libraries rules
|
2003-03-21 01:12:29 +00:00
|
|
|
%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
|
|
|
|
$(RM) $@ && ln -s $*$(SO_TARGET_VERSION).$(SO) $@
|
|
|
|
%.$(SO): %$(SO_TARGET_VERSION).$(SO)
|
|
|
|
$(RM) $@ && ln -s $*$(SO_TARGET_VERSION).$(SO) $@
|
2001-10-03 23:32:12 +00:00
|
|
|
|
2003-05-27 16:47:59 +00:00
|
|
|
## End 390-specific setup
|