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