intl/icu/source/config/mh-os400

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 ## -*-makefile-*-
michael@0 2 ## OS400-specific setup (for cross build)
michael@0 3 ## Copyright (c) 1999-2013, International Business Machines Corporation and
michael@0 4 ## others. All Rights Reserved.
michael@0 5
michael@0 6 # This otherwise breaks on OS400 - can't find "shell"
michael@0 7 CURR_FULL_DIR=.
michael@0 8 CURR_SRCCODE_FULL_DIR=.
michael@0 9
michael@0 10 GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
michael@0 11 GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
michael@0 12
michael@0 13 THREADSCPPFLAGS = -D_MULTI_THREADED
michael@0 14
michael@0 15 # put this in the environment to get threading
michael@0 16 THREADSENVFLAGS = QIBM_MULTI_THREADED=Y ;
michael@0 17
michael@0 18 ## Commands to compile
michael@0 19 # -qTERASPACE: large pointers
michael@0 20 # -qPFROPT=*STRDONLY: Strings are read-only
michael@0 21 COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
michael@0 22 COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY -qRTTIALL
michael@0 23
michael@0 24 ## ICULD program - run bldiculd.sh in icu/as_is/os400/ to build it
michael@0 25 ICULD=/qsys.lib/$(OUTPUTDIR).lib/iculd.pgm
michael@0 26
michael@0 27 ## Commands to link
michael@0 28 ## We need to use the C++ linker, even when linking C programs, since
michael@0 29 ## our libraries contain C++ code (C++ static init not called)
michael@0 30 LINK.c= $(ICULD) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
michael@0 31 LINK.cc= $(ICULD) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
michael@0 32
michael@0 33 ## Commands to make a shared library
michael@0 34 # -qALWLIBUPD: It allows the compiled service program to have dependencies on
michael@0 35 # service programs in a different library than that specified originally
michael@0 36 # by CRTSRVPGM after having used the UPDSRVPGM command.
michael@0 37 # Similar to -fPIC and -install_name on other compilers, but different.
michael@0 38 SHLIB.c= ld -v -qOPTION='*DUPPROC *DUPVAR' -qALWLIBUPD=*YES
michael@0 39 SHLIB.cc= ld -v -qOPTION='*DUPPROC *DUPVAR' -qALWLIBUPD=*YES
michael@0 40 AR = qar
michael@0 41 ARFLAGS = -cuv
michael@0 42
michael@0 43 ## Compiler switch to embed a runtime search path
michael@0 44 LD_RPATH= -I
michael@0 45 LD_RPATH_PRE= -I
michael@0 46
michael@0 47 ## Make target to rebind the common library
michael@0 48 ## to the actual data versus the stub data
michael@0 49 POST_DATA_BUILD = os400-data-rebind
michael@0 50
michael@0 51 # The stubdata directory is the same directory as the normal data library.
michael@0 52 STUBDATA_LIBDIR = $(LIBDIR)/
michael@0 53
michael@0 54 ## Versioned target for a shared library.
michael@0 55 FINAL_SO_TARGET = $(SO_TARGET)
michael@0 56 MIDDLE_SO_TARGET =
michael@0 57
michael@0 58 # this one is for icudefs.mk's use
michael@0 59 ifeq ($(ENABLE_SHARED),YES)
michael@0 60 SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
michael@0 61 endif
michael@0 62
michael@0 63 # this one is for the individual make files and linking
michael@0 64 ICULIBSUFFIX = $(SO_TARGET_VERSION_SUFFIX)
michael@0 65
michael@0 66 ## object suffix
michael@0 67 TO= o
michael@0 68
michael@0 69 ## Shared object suffix
michael@0 70 SO= so
michael@0 71 ## Non-shared intermediate object suffix
michael@0 72 STATIC_O = o
michael@0 73
michael@0 74 ## Platform command to remove or move executable target
michael@0 75 RMV = del
michael@0 76 ## Platform commands to remove or move executable and library targets
michael@0 77 INSTALL-S = cp -fph
michael@0 78 INSTALL-L = $(INSTALL-S)
michael@0 79
michael@0 80 # Stub name overrides for iSeries
michael@0 81 DATA_STUBNAME = dt
michael@0 82 I18N_STUBNAME = in
michael@0 83 CTESTFW_STUBNAME = tf
michael@0 84
michael@0 85 ## Link commands to link to ICU service programs
michael@0 86 LIBICUDT = $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 87 LIBICUUC = $(LIBDIR)/$(LIBICU)$(COMMON_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 88 LIBICUI18N = $(LIBDIR)/$(LIBICU)$(I18N_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 89 LIBICULE = $(LIBDIR)/$(LIBICU)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 90 LIBICULX = $(LIBDIR)/$(LIBICU)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 91 LIBCTESTFW = $(top_builddir)/tools/ctestfw/$(LIBICU)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 92 LIBICUTOOLUTIL = $(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 93 LIBICUIO= $(LIBDIR)/$(LIBICU)$(IO_STUBNAME)$(ICULIBSUFFIX).$(SO)
michael@0 94
michael@0 95 ## Special OS400 rules
michael@0 96
michael@0 97 ## Build archive from shared object
michael@0 98 %.a : %.o
michael@0 99 $(AR) $(ARFLAGS) $@ $<
michael@0 100
michael@0 101 ## Build import list from export list
michael@0 102 %.e : %.exp
michael@0 103 @echo "Building an import list for $<"
michael@0 104 @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
michael@0 105
michael@0 106 ## Compilation rules
michael@0 107 %.$(STATIC_O): $(srcdir)/%.c
michael@0 108 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
michael@0 109 %.o: $(srcdir)/%.c
michael@0 110 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
michael@0 111
michael@0 112 %.$(STATIC_O): $(srcdir)/%.cpp
michael@0 113 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
michael@0 114 %.o: $(srcdir)/%.cpp
michael@0 115 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
michael@0 116
michael@0 117 %.qwobj : $(srcdir)/%.c
michael@0 118 $(COMPILE.c) -o $@ $<
michael@0 119
michael@0 120 %.qwobj : $(srcdir)/%.cpp
michael@0 121 $(COMPILE.cc) -o $@ $<
michael@0 122
michael@0 123 ## Dependency rules
michael@0 124 %.d : %.u
michael@0 125 # @$(SHELL) -ec 'cat $< \
michael@0 126 # | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
michael@0 127 # [ -s $@ ] || rm -f $@ ; rm -f $<'
michael@0 128
michael@0 129 %.u : $(srcdir)/%.c
michael@0 130 @echo "generating dependency information for $<"
michael@0 131 # @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
michael@0 132 # @$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
michael@0 133
michael@0 134 %.u : $(srcdir)/%.cpp
michael@0 135 @echo "generating dependency information for $<"
michael@0 136 # @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
michael@0 137 # @$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1'
michael@0 138
michael@0 139 ## End OS400-specific setup

mercurial