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