xref: /aosp_15_r20/external/icu/icu4c/source/config/mh-os390 (revision 0e209d3975ff4a8c132096b14b0e9364a753506e)
1*0e209d39SAndroid Build Coastguard Worker## -*-makefile-*-
2*0e209d39SAndroid Build Coastguard Worker## Copyright (C) 2016 and later: Unicode, Inc. and others.
3*0e209d39SAndroid Build Coastguard Worker## License & terms of use: http://www.unicode.org/copyright.html
4*0e209d39SAndroid Build Coastguard Worker## os/390, z/OS specific setup
5*0e209d39SAndroid Build Coastguard Worker## Copyright (c) 1999-2014, International Business Machines Corporation and
6*0e209d39SAndroid Build Coastguard Worker## others. All Rights Reserved.
7*0e209d39SAndroid Build Coastguard Worker
8*0e209d39SAndroid Build Coastguard Worker###################################################################
9*0e209d39SAndroid Build Coastguard Worker#                    IMPORTANT NOTE                               #
10*0e209d39SAndroid Build Coastguard Worker###################################################################
11*0e209d39SAndroid Build Coastguard Worker# Before you try to run the Makefile, make sure you have the      #
12*0e209d39SAndroid Build Coastguard Worker# environment variables set.                                      #
13*0e209d39SAndroid Build Coastguard Worker#                                                                 #
14*0e209d39SAndroid Build Coastguard Worker# If you are going to do the OS390BATCH build, make sure you have #
15*0e209d39SAndroid Build Coastguard Worker# the OS390BATCH environment variable set.                        #
16*0e209d39SAndroid Build Coastguard Worker#                                                                 #
17*0e209d39SAndroid Build Coastguard Worker#   export OS390BATCH=1                                           #
18*0e209d39SAndroid Build Coastguard Worker#                                                                 #
19*0e209d39SAndroid Build Coastguard Worker# To build a version of ICU that does not use IEEE Floating point #
20*0e209d39SAndroid Build Coastguard Worker#                                                                 #
21*0e209d39SAndroid Build Coastguard Worker#   export IEEE390=0                                              #
22*0e209d39SAndroid Build Coastguard Worker#                                                                 #
23*0e209d39SAndroid Build Coastguard Worker# To build a version of ICU which uses a two data libraries       #
24*0e209d39SAndroid Build Coastguard Worker# where the smaller one is loaded first, use OS390_STUBDATA.      #
25*0e209d39SAndroid Build Coastguard Worker# USAGE OF THIS OPTION IS DEPRECATED. You should look into using  #
26*0e209d39SAndroid Build Coastguard Worker# Link Pack Area (LPA), library lookaside facility (LLA) or other #
27*0e209d39SAndroid Build Coastguard Worker# z/OS options that enable page fault based loading of read-only  #
28*0e209d39SAndroid Build Coastguard Worker# code/data instead of this option.                               #
29*0e209d39SAndroid Build Coastguard Worker# This option will be removed in a future version of ICU.         #
30*0e209d39SAndroid Build Coastguard Worker#                                                                 #
31*0e209d39SAndroid Build Coastguard Worker#   export OS390_STUBDATA=1                                       #
32*0e209d39SAndroid Build Coastguard Worker#                                                                 #
33*0e209d39SAndroid Build Coastguard Worker# To build a version of ICU which exploits the C/C++ compiler     #
34*0e209d39SAndroid Build Coastguard Worker# and runtime Extra Performance Linkage (XPLINK), specify         #
35*0e209d39SAndroid Build Coastguard Worker#                                                                 #
36*0e209d39SAndroid Build Coastguard Worker#   export OS390_XPLINK=1                                         #
37*0e209d39SAndroid Build Coastguard Worker#                                                                 #
38*0e209d39SAndroid Build Coastguard Worker###################################################################
39*0e209d39SAndroid Build Coastguard Worker
40*0e209d39SAndroid Build Coastguard Worker# TODO: Fix this configuration so that icu-config will work!
41*0e209d39SAndroid Build Coastguard Worker#       If statements don't work well when icu-config is generated.
42*0e209d39SAndroid Build Coastguard Workerifeq (${IEEE390},)
43*0e209d39SAndroid Build Coastguard WorkerIEEE390=1#M#
44*0e209d39SAndroid Build Coastguard Workerendif
45*0e209d39SAndroid Build Coastguard Worker
46*0e209d39SAndroid Build Coastguard Workerifeq (${IEEE390}, 1)
47*0e209d39SAndroid Build Coastguard WorkerICU_IEEE          = -Wc,'FLOAT(IEEE)' -DIEEE_754=0#M#
48*0e209d39SAndroid Build Coastguard Workerelse
49*0e209d39SAndroid Build Coastguard WorkerICU_IEEE          =#M#
50*0e209d39SAndroid Build Coastguard Workerendif
51*0e209d39SAndroid Build Coastguard Worker
52*0e209d39SAndroid Build Coastguard Worker## Additional flags when building libraries and with threads
53*0e209d39SAndroid Build Coastguard WorkerTHREADSCPPFLAGS = -D_OPEN_THREADS=3
54*0e209d39SAndroid Build Coastguard Worker
55*0e209d39SAndroid Build Coastguard Worker# For a dynamically called DLL module to share access to the POSIX external
56*0e209d39SAndroid Build Coastguard Worker# variables, with its caller, the DLL module must define these _SHR_* macros.
57*0e209d39SAndroid Build Coastguard WorkerSHAREDLIBCPPFLAGS	= -D_SHR_TZNAME -D_SHR_TIMEZONE
58*0e209d39SAndroid Build Coastguard Worker
59*0e209d39SAndroid Build Coastguard Worker# -Wc,expo is used to export all functions
60*0e209d39SAndroid Build Coastguard WorkerSHAREDLIBCFLAGS	= -Wc,expo
61*0e209d39SAndroid Build Coastguard WorkerSHAREDLIBCXXFLAGS	= -Wc,expo
62*0e209d39SAndroid Build Coastguard Worker
63*0e209d39SAndroid Build Coastguard Worker# TODO: Consider using  -Wc,roc,ros for making the data and strings readonly
64*0e209d39SAndroid Build Coastguard Worker#       -Wc,"ros" seems to work, but not the "roc"
65*0e209d39SAndroid Build Coastguard Worker# The RENT option makes the program reentrant. This may not really have the same
66*0e209d39SAndroid Build Coastguard Worker#       meaning as normal reentrancy on other platforms. See the z/OS documentation
67*0e209d39SAndroid Build Coastguard Worker#       for details. This is the default for C++, but not C.
68*0e209d39SAndroid Build Coastguard Worker# The DLL option must be used by the callee and caller code when using shared libraries.
69*0e209d39SAndroid Build Coastguard Worker# NOCSECT might be used as an optimization option.
70*0e209d39SAndroid Build Coastguard Worker# -+ means accept any file extension as a C++ file. By default only .C is accepted.
71*0e209d39SAndroid Build Coastguard WorkerCFLAGS          += -Wc,DLL,ROS,RENT,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'LANGLVL(EXTENDED)' $(ICU_IEEE)
72*0e209d39SAndroid Build Coastguard WorkerCXXFLAGS        += -Wc,DLL,ROS,RTTI,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'LANGLVL(EXTENDED0X)' $(ICU_IEEE) -+
73*0e209d39SAndroid Build Coastguard WorkerARFLAGS         = -cr
74*0e209d39SAndroid Build Coastguard Worker
75*0e209d39SAndroid Build Coastguard Worker# _MSE_PROTOS usually interacts with _XOPEN_SOURCE. It affects some standard
76*0e209d39SAndroid Build Coastguard Worker# C functions that use wchar_t, and it selects behavior for
77*0e209d39SAndroid Build Coastguard Worker# multibyte extension support (MSE) functions.
78*0e209d39SAndroid Build Coastguard Worker#DEFS            += -D_MSE_PROTOS
79*0e209d39SAndroid Build Coastguard Worker
80*0e209d39SAndroid Build Coastguard Workerifeq (${OS390_XPLINK}, 1)
81*0e209d39SAndroid Build Coastguard Worker#SH# if [ "x$OS390_XPLINK" = "x1" ]; then
82*0e209d39SAndroid Build Coastguard Worker# These lines must be the last options specified.
83*0e209d39SAndroid Build Coastguard Worker# GOFF is the strategic object module format for S/390. It is required for XPLINK.
84*0e209d39SAndroid Build Coastguard Worker# NOTEMPINC could be used if ICU starts using templates.
85*0e209d39SAndroid Build Coastguard WorkerICU_XPLINK_C      = -Wc,'xplink(backchain,storeargs),goff'
86*0e209d39SAndroid Build Coastguard WorkerICU_XPLINK_CXX    = -Wc,'xplink(backchain,storeargs),goff' -Wc,'NOTEMPINC'
87*0e209d39SAndroid Build Coastguard WorkerICU_XPLINK_L      = -Wl,xplink
88*0e209d39SAndroid Build Coastguard Worker#SH# fi
89*0e209d39SAndroid Build Coastguard Workerendif
90*0e209d39SAndroid Build Coastguard Worker
91*0e209d39SAndroid Build Coastguard Worker## OS390BATCH
92*0e209d39SAndroid Build Coastguard Workerifeq (${OS390BATCH},1)
93*0e209d39SAndroid Build Coastguard WorkerDEFS            += -DOS390BATCH#M#
94*0e209d39SAndroid Build Coastguard Workerendif
95*0e209d39SAndroid Build Coastguard Worker
96*0e209d39SAndroid Build Coastguard Worker## Commands to generate dependency files
97*0e209d39SAndroid Build Coastguard WorkerGEN_DEPS.c=	makedep
98*0e209d39SAndroid Build Coastguard WorkerGEN_DEPS.cc=	makedep
99*0e209d39SAndroid Build Coastguard Worker
100*0e209d39SAndroid Build Coastguard Worker## Commands to compile
101*0e209d39SAndroid Build Coastguard Worker# _CXX_STEPS="-1" is a prelink step when compiling C and C++, and
102*0e209d39SAndroid Build Coastguard Worker# it's only needed for long function names
103*0e209d39SAndroid Build Coastguard WorkerCOMPILE.c       = $(COMPILE_LINK_ENVVAR) $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(ICU_XPLINK_C) -c
104*0e209d39SAndroid Build Coastguard WorkerCOMPILE.cc      = $(COMPILE_LINK_ENVVAR) $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(ICU_XPLINK_CXX) -c
105*0e209d39SAndroid Build Coastguard Worker
106*0e209d39SAndroid Build Coastguard Worker# Commands to link
107*0e209d39SAndroid Build Coastguard WorkerLINK.c=		$(COMPILE_LINK_ENVVAR) $(CC) $(CFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
108*0e209d39SAndroid Build Coastguard WorkerLINK.cc=	$(COMPILE_LINK_ENVVAR) $(CXX) $(CXXFLAGS) -Wl,dll $(LDFLAGS) $(ICU_XPLINK_L)
109*0e209d39SAndroid Build Coastguard Worker
110*0e209d39SAndroid Build Coastguard Worker## Commands for shared library (dll)
111*0e209d39SAndroid Build Coastguard WorkerSHLIB.c=	$(LINK.c)
112*0e209d39SAndroid Build Coastguard WorkerSHLIB.cc=	$(LINK.cc)
113*0e209d39SAndroid Build Coastguard Worker
114*0e209d39SAndroid Build Coastguard Worker## Compiler switch to embed a runtime search path
115*0e209d39SAndroid Build Coastguard WorkerLD_RPATH=	-I
116*0e209d39SAndroid Build Coastguard Worker
117*0e209d39SAndroid Build Coastguard Worker## Environment variable to set a runtime search path
118*0e209d39SAndroid Build Coastguard WorkerLDLIBRARYPATH_ENVVAR = LIBPATH
119*0e209d39SAndroid Build Coastguard Worker
120*0e209d39SAndroid Build Coastguard Worker## An import library (a.k.a. sidedeck) is needed for z/OS and MSVC
121*0e209d39SAndroid Build Coastguard WorkerIMPORT_LIB_EXT = .x
122*0e209d39SAndroid Build Coastguard Worker
123*0e209d39SAndroid Build Coastguard Worker## Versioned target for a shared library.
124*0e209d39SAndroid Build Coastguard WorkerFINAL_SO_TARGET=  $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
125*0e209d39SAndroid Build Coastguard WorkerMIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
126*0e209d39SAndroid Build Coastguard Worker
127*0e209d39SAndroid Build Coastguard Worker## Versioned import library names.
128*0e209d39SAndroid Build Coastguard WorkerIMPORT_LIB = $(basename $(notdir $(SO_TARGET)))$(IMPORT_LIB_EXT)#M#
129*0e209d39SAndroid Build Coastguard WorkerMIDDLE_IMPORT_LIB = $(basename $(notdir $(MIDDLE_SO_TARGET)))$(IMPORT_LIB_EXT)#M#
130*0e209d39SAndroid Build Coastguard WorkerFINAL_IMPORT_LIB = $(basename $(notdir $(FINAL_SO_TARGET)))$(IMPORT_LIB_EXT)#M#
131*0e209d39SAndroid Build Coastguard Worker
132*0e209d39SAndroid Build Coastguard Worker## Non-shared intermediate object suffix
133*0e209d39SAndroid Build Coastguard WorkerSTATIC_O = o
134*0e209d39SAndroid Build Coastguard Worker
135*0e209d39SAndroid Build Coastguard Workerifeq ($(OS390_STUBDATA),1)
136*0e209d39SAndroid Build Coastguard Worker## Suffix of the subset data library for dual common library support
137*0e209d39SAndroid Build Coastguard WorkerSTUB_SUFFIX=_stub#M#
138*0e209d39SAndroid Build Coastguard WorkerDEFS      += -DOS390_STUBDATA -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"#M#
139*0e209d39SAndroid Build Coastguard Workerendif
140*0e209d39SAndroid Build Coastguard Worker
141*0e209d39SAndroid Build Coastguard Workerifeq ($(OS390BATCH),1)
142*0e209d39SAndroid Build Coastguard Worker## PDS_NAME_PREFIX sets the prefix of the PDS dataset name while keeping the ICU version number.
143*0e209d39SAndroid Build Coastguard Worker## To use custom names set ICU_PDS_NAME and ICU_PDS_NAME_SUFFIX
144*0e209d39SAndroid Build Coastguard Worker## IXM is used as a name prefix for XML Toolkit, default value
145*0e209d39SAndroid Build Coastguard Workerifeq ($(PDS_NAME_PREFIX),)
146*0e209d39SAndroid Build Coastguard WorkerPDS_NAME_PREFIX= IXMI
147*0e209d39SAndroid Build Coastguard Workerendif
148*0e209d39SAndroid Build Coastguard Workerifeq ($(ICU_PDS_NAME),)
149*0e209d39SAndroid Build Coastguard WorkerPDS_FULL_NAME=${PDS_NAME_PREFIX}${SO_TARGET_VERSION_MAJOR}
150*0e209d39SAndroid Build Coastguard Workerelse
151*0e209d39SAndroid Build Coastguard WorkerPDS_FULL_NAME=${ICU_PDS_NAME}
152*0e209d39SAndroid Build Coastguard Workerendif
153*0e209d39SAndroid Build Coastguard Workerifeq ($(OS390_STUBDATA),1)
154*0e209d39SAndroid Build Coastguard WorkerBATCH_STUB_TARGET=	"//'${LOADMOD}(${PDS_FULL_NAME}D1${ICU_PDS_NAME_SUFFIX})'"
155*0e209d39SAndroid Build Coastguard WorkerBATCH_LIBICUDT=		"//'${LOADEXP}(${PDS_FULL_NAME}D1${ICU_PDS_NAME_SUFFIX})'"
156*0e209d39SAndroid Build Coastguard Workerelse
157*0e209d39SAndroid Build Coastguard WorkerBATCH_STUB_TARGET=	"//'${LOADMOD}(${PDS_FULL_NAME}DA${ICU_PDS_NAME_SUFFIX})'"
158*0e209d39SAndroid Build Coastguard WorkerBATCH_LIBICUDT=		"//'${LOADEXP}(${PDS_FULL_NAME}DA${ICU_PDS_NAME_SUFFIX})'"
159*0e209d39SAndroid Build Coastguard WorkerPKGDATA_DEFS        += -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"
160*0e209d39SAndroid Build Coastguard Workerendif
161*0e209d39SAndroid Build Coastguard Worker
162*0e209d39SAndroid Build Coastguard WorkerBATCH_COMMON_TARGET="//'${LOADMOD}(${PDS_FULL_NAME}UC${ICU_PDS_NAME_SUFFIX})'"
163*0e209d39SAndroid Build Coastguard WorkerBATCH_I18N_TARGET="//'${LOADMOD}(${PDS_FULL_NAME}IN${ICU_PDS_NAME_SUFFIX})'"
164*0e209d39SAndroid Build Coastguard WorkerBATCH_IO_TARGET="//'${LOADMOD}(${PDS_FULL_NAME}IO${ICU_PDS_NAME_SUFFIX})'"
165*0e209d39SAndroid Build Coastguard WorkerBATCH_LAYOUT_TARGET="//'${LOADMOD}(${PDS_FULL_NAME}LE${ICU_PDS_NAME_SUFFIX})'"
166*0e209d39SAndroid Build Coastguard WorkerBATCH_LAYOUTEX_TARGET="//'${LOADMOD}(${PDS_FULL_NAME}LX${ICU_PDS_NAME_SUFFIX})'"
167*0e209d39SAndroid Build Coastguard Worker
168*0e209d39SAndroid Build Coastguard WorkerBATCH_LIBICUUC=		"//'${LOADEXP}(${PDS_FULL_NAME}UC${ICU_PDS_NAME_SUFFIX})'"
169*0e209d39SAndroid Build Coastguard WorkerBATCH_LIBICUI18N=	"//'${LOADEXP}(${PDS_FULL_NAME}IN${ICU_PDS_NAME_SUFFIX})'"
170*0e209d39SAndroid Build Coastguard WorkerBATCH_LIBICUIO=		"//'${LOADEXP}(${PDS_FULL_NAME}IO${ICU_PDS_NAME_SUFFIX})'"
171*0e209d39SAndroid Build Coastguard WorkerBATCH_LIBICULE=		"//'${LOADEXP}(${PDS_FULL_NAME}LE${ICU_PDS_NAME_SUFFIX})'"
172*0e209d39SAndroid Build Coastguard WorkerBATCH_LIBICULX=		"//'${LOADEXP}(${PDS_FULL_NAME}LX${ICU_PDS_NAME_SUFFIX})'"
173*0e209d39SAndroid Build Coastguard Workerendif
174*0e209d39SAndroid Build Coastguard Worker
175*0e209d39SAndroid Build Coastguard Worker
176*0e209d39SAndroid Build Coastguard Worker## Link commands to link to ICU libs
177*0e209d39SAndroid Build Coastguard WorkerLIBICUDT=	$(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(STUB_SUFFIX)$(SO_TARGET_VERSION).x
178*0e209d39SAndroid Build Coastguard WorkerLIBICUUC=	$(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
179*0e209d39SAndroid Build Coastguard WorkerLIBICUI18N=	$(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
180*0e209d39SAndroid Build Coastguard WorkerLIBICULX=	$(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
181*0e209d39SAndroid Build Coastguard WorkerLIBICUIO=	$(top_builddir)/io/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
182*0e209d39SAndroid Build Coastguard WorkerLIBCTESTFW=	$(top_builddir)/tools/ctestfw/$(LIBICU)test$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
183*0e209d39SAndroid Build Coastguard WorkerLIBICUTOOLUTIL=	$(top_builddir)/tools/toolutil/$(LIBICU)tu$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
184*0e209d39SAndroid Build Coastguard Worker
185*0e209d39SAndroid Build Coastguard Workerifneq (${ICUDATA_CHAR},e)
186*0e209d39SAndroid Build Coastguard Worker#SH# if [ "$ICUDATA_CHAR" != "e" ]; then
187*0e209d39SAndroid Build Coastguard Worker## We're in ASCII mode.
188*0e209d39SAndroid Build Coastguard WorkerCFLAGS		+= -Wc,'ascii'
189*0e209d39SAndroid Build Coastguard WorkerCXXFLAGS	+= -Wc,'ascii'
190*0e209d39SAndroid Build Coastguard WorkerSO = so
191*0e209d39SAndroid Build Coastguard Workerelse
192*0e209d39SAndroid Build Coastguard Worker#SH# else
193*0e209d39SAndroid Build Coastguard Worker## We're in EBCDIC mode.
194*0e209d39SAndroid Build Coastguard Worker## Shared object suffix
195*0e209d39SAndroid Build Coastguard WorkerSO = dll
196*0e209d39SAndroid Build Coastguard Workerendif
197*0e209d39SAndroid Build Coastguard Worker#SH# fi
198*0e209d39SAndroid Build Coastguard Worker
199*0e209d39SAndroid Build Coastguard Worker## Special 390 rules
200*0e209d39SAndroid Build Coastguard Worker
201*0e209d39SAndroid Build Coastguard Worker## Build archive from object
202*0e209d39SAndroid Build Coastguard Worker%.a : $(OBJECTS)
203*0e209d39SAndroid Build Coastguard Worker	$(AR) $(ARFLAGS) $@ $(OBJECTS)
204*0e209d39SAndroid Build Coastguard Worker
205*0e209d39SAndroid Build Coastguard Worker## Compilation rules
206*0e209d39SAndroid Build Coastguard Worker%.$(STATIC_O): $(srcdir)/%.c
207*0e209d39SAndroid Build Coastguard Worker	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
208*0e209d39SAndroid Build Coastguard Worker%.o: $(srcdir)/%.c
209*0e209d39SAndroid Build Coastguard Worker	$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
210*0e209d39SAndroid Build Coastguard Worker
211*0e209d39SAndroid Build Coastguard Worker# This causes escapesrc to be built before other ICU targets.
212*0e209d39SAndroid Build Coastguard WorkerNEED_ESCAPING=YES
213*0e209d39SAndroid Build Coastguard Worker
214*0e209d39SAndroid Build Coastguard Workerifneq ($(SKIP_ESCAPING),)
215*0e209d39SAndroid Build Coastguard Worker%.$(STATIC_O): $(srcdir)/%.cpp
216*0e209d39SAndroid Build Coastguard Worker	$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
217*0e209d39SAndroid Build Coastguard Worker%.o: $(srcdir)/%.cpp
218*0e209d39SAndroid Build Coastguard Worker	$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
219*0e209d39SAndroid Build Coastguard Workerelse
220*0e209d39SAndroid Build Coastguard Worker# convert *.cpp files to _*.cpp with \u / \U escaping
221*0e209d39SAndroid Build Coastguard WorkerCLEANFILES += _*.cpp
222*0e209d39SAndroid Build Coastguard Worker
223*0e209d39SAndroid Build Coastguard Worker# the actual escaping
224*0e209d39SAndroid Build Coastguard Worker_%.cpp: $(srcdir)/%.cpp
225*0e209d39SAndroid Build Coastguard Worker	@$(BINDIR)/escapesrc$(EXEEXT) $< $@
226*0e209d39SAndroid Build Coastguard Worker
227*0e209d39SAndroid Build Coastguard Worker%.$(STATIC_O): _%.cpp
228*0e209d39SAndroid Build Coastguard Worker	$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
229*0e209d39SAndroid Build Coastguard Worker%.o: _%.cpp
230*0e209d39SAndroid Build Coastguard Worker	$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
231*0e209d39SAndroid Build Coastguard Workerendif
232*0e209d39SAndroid Build Coastguard Worker
233*0e209d39SAndroid Build Coastguard Worker## Dependency rules
234*0e209d39SAndroid Build Coastguard Worker%.d : %.u
235*0e209d39SAndroid Build Coastguard Worker	@$(SHELL) -ec 'cat $<  \
236*0e209d39SAndroid Build Coastguard Worker		| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
237*0e209d39SAndroid Build Coastguard Worker		[ -s $@ ] || rm -f $@ ; rm -f $<'
238*0e209d39SAndroid Build Coastguard Worker
239*0e209d39SAndroid Build Coastguard Worker%.u : $(srcdir)/%.c
240*0e209d39SAndroid Build Coastguard Worker	@echo "generating dependency information for $<"
241*0e209d39SAndroid Build Coastguard Worker	@$(SHELL) -ec 'touch            $*.u  > /dev/null 2>&1'
242*0e209d39SAndroid Build Coastguard Worker	@$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
243*0e209d39SAndroid Build Coastguard Worker
244*0e209d39SAndroid Build Coastguard Worker%.u : $(srcdir)/%.cpp
245*0e209d39SAndroid Build Coastguard Worker	@echo "generating dependency information for $<"
246*0e209d39SAndroid Build Coastguard Worker	@$(SHELL) -ec 'touch              $*.u  > /dev/null 2>&1'
247*0e209d39SAndroid Build Coastguard Worker	@$(SHELL) -ec '$(GEN_DEPS.cc)  -f $*.u $< > /dev/null 2>&1'
248*0e209d39SAndroid Build Coastguard Worker
249*0e209d39SAndroid Build Coastguard Worker## Versioned libraries rules
250*0e209d39SAndroid Build Coastguard Worker%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
251*0e209d39SAndroid Build Coastguard Worker	$(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
252*0e209d39SAndroid Build Coastguard Worker%.$(SO): %$(SO_TARGET_VERSION).$(SO)
253*0e209d39SAndroid Build Coastguard Worker	$(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
254*0e209d39SAndroid Build Coastguard Worker
255*0e209d39SAndroid Build Coastguard Worker## Install libraries as executable
256*0e209d39SAndroid Build Coastguard WorkerINSTALL-L=$(INSTALL_PROGRAM)
257*0e209d39SAndroid Build Coastguard Worker
258*0e209d39SAndroid Build Coastguard Worker## End 390-specific setup
259