]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-os390
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / mh-os390
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## 390-specific setup
374ca955 3## Copyright (c) 1999-2004, International Business Machines Corporation and
b75a7d8f 4## others. All Rights Reserved.
b75a7d8f
A
5
6###################################################################
7# IMPORTANT NOTE #
8###################################################################
9# Before you try to run the Makefile, make sure you have the #
10# environment variables set. #
11# #
12# If you are going to do the OS390BATCH build, make sure you have #
13# the OS390BATCH environment variable set. #
14# #
15# export OS390BATCH=1 #
16# #
17# To build a version of ICU which uses IEEE Floating point #
18# #
19# export IEEE390=1 #
20# #
21# To build a version of ICU which uses a two common libraries #
22# where the smaller one is loaded first. #
23# #
24# export OS390_STUBDATA=1 #
25# #
26# To build a version of ICU which exploits the C/C++ compiler #
27# and runtime Extra Performance Linkage (XPLINK), specify #
28# #
29# export OS390_XPLINK=1 #
30# #
31###################################################################
32
33ifeq (${IEEE390},)
34IEEE390=1
35endif
36
37ifeq (${IEEE390}, 1)
38ICU_IEEE = -Wc,"float(ieee)" -DIEEE_754=1
39else
40ICU_IEEE = -DIEEE_754=0
41endif
42
43# TODO: Consider using -Wc,roc,ros for making the data and strings readonly
44# -Wc,"ros" seems to work, but not the "roc"
45CFLAGS += -Wc,"langlvl(extended),spill(2000)" -Wc,"ros" $(ICU_BUILD_OPTIONS) $(ICU_IEEE) -Wc,dll,expo
46CXXFLAGS += -Wc,"langlvl(extended),spill(2000)" -Wc,"ros" $(ICU_BUILD_OPTIONS) $(ICU_IEEE) -Wc,dll,expo
374ca955 47DEFS += -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_MSE_PROTOS -D_SHR_TZNAME -D_SHR_TIMEZONE -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"
b75a7d8f
A
48ARFLAGS = -cr
49
50# TODO: Fix this configuration so that icu-config will work!
51# This means we shouldn't be using so many of these special case defines.
52ifeq (${OS390_XPLINK}, 1)
53# Note: The following options require the PTF for PQ69418 on z/OS 1.2
54# and later.
55# These lines must be the last options specified.
56ICU_XPLINK_C = -Wc,"xplink(backchain,storeargs)" -Wc,"GOFF,NOCSECT,RENT,SSCOMM" -Wc,"inline(auto,noreport,500,2500)"
57ICU_XPLINK_CPP = -Wc,"xplink(backchain,storeargs)" -Wc,"GOFF,NOCSECT,NOTEMPINC" -Wc,"inline(auto,noreport,300,2500)"
58ICU_XPLINK_L = -Wl,dll,xplink -Wl,EDIT=NO
59endif
60
61## OS390BATCH
62ifeq (${OS390BATCH},1)
63DEFS += -DOS390BATCH
64endif
65
66# Uncomment this line or do "gmake OS390_STUBDATA=1" to enable dual common library support
67#OS390_STUBDATA=1
68
69
70## Commands to generate dependency files
71GEN_DEPS.c= makedep
72GEN_DEPS.cc= makedep
73
74## Commands to compile
75# _CXX_STEPS="-1" is a prelink step when compiling C and C++, and
76# it's only needed for long function names
77COMPILE.c = $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(ICU_XPLINK_C) -c
78COMPILE.cc = _CXX_CXXSUFFIX="cpp" $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(ICU_XPLINK_CPP) -c
79
80# Commands to link
81LINK.c= $(COMPILE_LINK_ENVVAR) $(CC) $(CFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
82LINK.cc= $(COMPILE_LINK_ENVVAR) $(CXX) $(CXXFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
83
84## Commands for shared library (dll)
85SHLIB.c= $(LINK.c)
86SHLIB.cc= $(LINK.cc)
87
88## Compiler switch to embed a runtime search path
89LD_RPATH= -I
90
91## Environment variable to set a runtime search path
92LDLIBRARYPATH_ENVVAR = LIBPATH
93
94## An import library (a.k.a. sidedeck) is needed for z/OS and MSVC
95IMPORT_LIB_EXT = .x
96
97## Versioned target for a shared library.
98FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
99MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
100
101## Versioned import library names.
374ca955
A
102IMPORT_LIB = $(basename $(notdir $(SO_TARGET)))$(IMPORT_LIB_EXT)
103MIDDLE_IMPORT_LIB = $(basename $(notdir $(MIDDLE_SO_TARGET)))$(IMPORT_LIB_EXT)
104FINAL_IMPORT_LIB = $(basename $(notdir $(FINAL_SO_TARGET)))$(IMPORT_LIB_EXT)
b75a7d8f
A
105
106## Shared object suffix (switch to dll for shared library build)
107SO = dll
108## Non-shared intermediate object suffix
109STATIC_O = o
110
111ifeq ($(OS390_STUBDATA),1)
112## Suffix of the subset data library for dual common library support
113STUB_SUFFIX=_stub
114DEFS += -DOS390_STUBDATA
115endif
116
117ifeq ($(OS390BATCH),1)
118ifeq ($(OS390_STUBDATA),1)
119BATCH_STUB_TARGET= "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
120BATCH_LIBICUDT= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
121else
122BATCH_STUB_TARGET= "//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}DA)'"
123BATCH_LIBICUDT= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}DA)'"
124endif
125
126BATCH_COMMON_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}UC)'"
374ca955
A
127BATCH_I18N_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}IN)'"
128BATCH_IO_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}IO)'"
129BATCH_LAYOUT_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}LE)'"
130BATCH_LAYOUTEX_TARGET="//'${LOADMOD}(IXMI${SO_TARGET_VERSION_MAJOR}LX)'"
b75a7d8f
A
131
132BATCH_LIBICUUC= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}UC)'"
133BATCH_LIBICUI18N= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}IN)'"
374ca955 134BATCH_LIBICUIO= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}IO)'"
b75a7d8f
A
135BATCH_LIBICULE= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}LE)'"
136BATCH_LIBICULX= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}LX)'"
137endif
138
139## Link commands to link to ICU libs
374ca955
A
140LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(STUB_SUFFIX)$(SO_TARGET_VERSION).x
141LIBICUUC= $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
142LIBICUI18N= $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
143LIBICULE= $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
144LIBICULX= $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
145LIBICUIO= $(top_builddir)/io/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
146LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)test$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
147LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/$(LIBICU)tu$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
b75a7d8f
A
148
149## Special 390 rules
150
151## Build archive from object
152%.a : $(OBJECTS)
153 $(AR) $(ARFLAGS) $@ $(OBJECTS)
154
155## Compilation rules
156%.$(STATIC_O): $(srcdir)/%.c
157 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
158%.o: $(srcdir)/%.c
159 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
160
161%.$(STATIC_O): $(srcdir)/%.cpp
162 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
163%.o: $(srcdir)/%.cpp
164 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
165
166## Dependency rules
167%.d : %.u
168 @$(SHELL) -ec 'cat $< \
169 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
170 [ -s $@ ] || rm -f $@ ; rm -f $<'
171
172%.u : $(srcdir)/%.c
173 @echo "generating dependency information for $<"
174 @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
175 @$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
176
177%.u : $(srcdir)/%.cpp
178 @echo "generating dependency information for $<"
179 @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
180 @$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1'
181
182## Versioned libraries rules
183%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
374ca955 184 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
b75a7d8f 185%.$(SO): %$(SO_TARGET_VERSION).$(SO)
374ca955 186 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
b75a7d8f 187
374ca955
A
188## Install libraries as executable
189INSTALL-L=$(INSTALL_PROGRAM)
190
191## End 390-specific setup