1999-09-03 22:08:47 +00:00
|
|
|
## -*-makefile-*-
|
1999-08-16 21:50:52 +00:00
|
|
|
## 390-specific setup
|
2001-03-21 20:31:13 +00:00
|
|
|
## Copyright (c) 1999-2001, 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
|
|
|
##
|
2002-05-24 17:44:00 +00:00
|
|
|
## $Id: mh-os390,v 1.38 2002/05/24 17:44:00 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 #
|
|
|
|
# #
|
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
|
|
|
|
|
2001-11-06 22:19:17 +00:00
|
|
|
# TODO: Consider using -Wc,roc,rent for making the data readonly
|
2000-03-10 01:52:03 +00:00
|
|
|
CFLAGS390= -Wc,"langlvl(extended),spill(2000)" $(ICU_BUILD_OPTIONS) $(ICU_IEEE) -Wc,dll,expo
|
1999-12-30 00:25:32 +00:00
|
|
|
## OS390BATCH
|
|
|
|
ifeq (${OS390BATCH},1)
|
2001-10-29 22:41:44 +00:00
|
|
|
DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_SHR_TZNAME -D_SHR_TIMEZONE -DOS390BATCH
|
1999-12-30 00:25:32 +00:00
|
|
|
else
|
2000-03-10 01:52:03 +00:00
|
|
|
DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_SHR_TZNAME -D_SHR_TIMEZONE
|
1999-12-30 00:25:32 +00:00
|
|
|
endif
|
1999-08-16 21:50:52 +00:00
|
|
|
ARFLAGS= -cr
|
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
|
|
|
|
COMPILE.c= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS390) $(DEFS390) -c
|
2000-04-04 16:30:21 +00:00
|
|
|
COMPILE.cc= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS390) $(DEFS390) -c
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2001-10-29 22:41:44 +00:00
|
|
|
# Commands to link
|
2001-11-06 22:19:17 +00:00
|
|
|
LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
|
|
|
LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
|
2001-10-29 22:41:44 +00:00
|
|
|
|
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
|
|
|
|
|
2001-11-09 18:09:54 +00:00
|
|
|
## Environment variable to set a runtime search path
|
|
|
|
LDLIBRARYPATH_ENVVAR = LIBPATH
|
|
|
|
|
2000-09-15 05:07:43 +00:00
|
|
|
## Versioned target for a shared library.
|
2002-05-24 17:44:00 +00:00
|
|
|
FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
|
|
|
|
MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIX).$(SO)
|
2000-09-15 05:07:43 +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-23 23:09:19 +00:00
|
|
|
STUB_SUFFIX=_390_
|
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)
|
2001-12-05 17:46:30 +00:00
|
|
|
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)'"
|
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
|
|
|
|
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
|
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
|
2002-05-24 17:44:00 +00:00
|
|
|
%$(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) $@
|
2001-10-03 23:32:12 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
## End 390-specific setup
|