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