scuffed-code/icu4c/source/config/mh-os390

141 lines
5.6 KiB
Plaintext
Raw Normal View History

1999-09-03 22:08:47 +00:00
## -*-makefile-*-
1999-08-16 21:50:52 +00:00
## 390-specific setup
## Copyright (c) 1999-2001, International Business Machines Corporation and
## others. All Rights Reserved.
##
## $Id: mh-os390,v 1.39 2002/05/24 17:53:42 grhoten-oss Exp $
1999-08-16 21:50:52 +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 #
# #
# To build a version of ICU which uses a two common libraries #
# where the smaller one is loaded first. #
# #
# export OS390_STUBDATA=1 #
# #
###################################################################
ifeq (${IEEE390}, 1)
ICU_IEEE = -Wc,"float(ieee)" -DIEEE_754=1
else
ICU_IEEE = -DIEEE_754=0
endif
# TODO: Consider using -Wc,roc,rent for making the data readonly
CFLAGS390= -Wc,"langlvl(extended),spill(2000)" $(ICU_BUILD_OPTIONS) $(ICU_IEEE) -Wc,dll,expo
## OS390BATCH
ifeq (${OS390BATCH},1)
DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_SHR_TZNAME -D_SHR_TIMEZONE -DOS390BATCH
else
DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_SHR_TZNAME -D_SHR_TIMEZONE
endif
1999-08-16 21:50:52 +00:00
ARFLAGS= -cr
# 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
COMPILE.c= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS390) $(DEFS390) -c
COMPILE.cc= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS390) $(DEFS390) -c
1999-08-16 21:50:52 +00:00
# Commands to link
LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
1999-09-03 22:08:47 +00:00
## Commands for shared library (dll)
1999-08-16 21:50:52 +00:00
SHLIB.c= $(LINK.c) -Wl,dll
SHLIB.cc= $(LINK.cc) -Wl,dll
## Compiler switch to embed a runtime search path
LD_RPATH= -I
## Environment variable to set a runtime search path
LDLIBRARYPATH_ENVVAR = LIBPATH
## Versioned target for a shared library.
FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIX).$(SO)
1999-08-16 21:50:52 +00:00
## Shared object suffix (switch to dll for shared library build)
SO = dll
## Non-shared intermediate object suffix
STATIC_O = o
1999-08-16 21:50:52 +00:00
ifeq ($(OS390_STUBDATA),1)
## Suffix of the subset data library for dual common library support
STUB_SUFFIX=_stub
endif
ifeq ($(OS390BATCH),1)
BATCH_STUB_TARGET= "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
BATCH_LIBICUUC= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}UC)'"
BATCH_LIBICUDT= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
endif
1999-09-03 22:08:47 +00:00
## Link commands to link to ICU libs
LIBICUDT= $(top_builddir)/stubdata/lib$(ICUPREFIX)data$(ICULIBSUFFIX)$(STUB_SUFFIX)$(SO_TARGET_VERSION).x
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
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
LIBUSTDIO= $(top_builddir)/extra/ustdio/libustdio$(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
%.$(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
@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
@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'
## Versioned libraries rules
%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
$(RM) $@ && ln -s $*$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO) $@
%.$(SO): %$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
$(RM) $@ && ln -s $*$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO) $@
1999-08-16 21:50:52 +00:00
## End 390-specific setup