1999-09-03 22:08:47 +00:00
|
|
|
## -*-makefile-*-
|
1999-08-16 21:50:52 +00:00
|
|
|
## 390-specific setup
|
2004-03-26 01:22:25 +00:00
|
|
|
## Copyright (c) 1999-2004, International Business Machines Corporation and
|
2000-01-17 19:48:20 +00:00
|
|
|
## others. All Rights Reserved.
|
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
|
2004-10-15 16:25:11 +00:00
|
|
|
DEFS += -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_MSE_PROTOS -D_SHR_TZNAME -D_SHR_TIMEZONE -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"
|
2003-05-27 16:47:59 +00:00
|
|
|
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.
|
2004-06-14 22:53:54 +00:00
|
|
|
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)
|
2003-03-19 01:56:39 +00:00
|
|
|
|
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)'"
|
2004-04-01 00:21:58 +00:00
|
|
|
BATCH_IO_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)'"
|
2004-04-01 00:21:58 +00:00
|
|
|
BATCH_LIBICUIO= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}IO)'"
|
2002-07-27 07:58:30 +00:00
|
|
|
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
|
2004-05-04 20:24:35 +00:00
|
|
|
LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(STUB_SUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICUUC= $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICUI18N= $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICULE= $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICULX= $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
2004-05-17 23:57:56 +00:00
|
|
|
LIBICUIO= $(top_builddir)/io/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
2004-05-21 17:15:31 +00:00
|
|
|
LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)test$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
|
|
|
LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/$(LIBICU)tu$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
|
1999-09-03 22:08:47 +00:00
|
|
|
|
2004-12-04 01:25:57 +00:00
|
|
|
ifneq (${ICUDATA_CHAR},e)
|
|
|
|
## We're in ASCII mode.
|
|
|
|
CFLAGS += -Wc,"ascii"
|
|
|
|
CXXFLAGS += -Wc,"ascii"
|
|
|
|
SO = so
|
|
|
|
else
|
|
|
|
## We're in EBCDIC mode.
|
|
|
|
## Shared object suffix
|
|
|
|
SO = dll
|
|
|
|
endif
|
|
|
|
|
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)
|
2004-03-26 22:33:12 +00:00
|
|
|
$(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
|
2003-03-21 01:12:29 +00:00
|
|
|
%.$(SO): %$(SO_TARGET_VERSION).$(SO)
|
2004-03-26 22:33:12 +00:00
|
|
|
$(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
|
2001-10-03 23:32:12 +00:00
|
|
|
|
2004-01-16 23:12:11 +00:00
|
|
|
## Install libraries as executable
|
|
|
|
INSTALL-L=$(INSTALL_PROGRAM)
|
|
|
|
|
2004-03-26 22:33:12 +00:00
|
|
|
## End 390-specific setup
|