]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-os400
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-os400
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## OS400-specific setup (for cross build)
3## Copyright (c) 1999-2003, International Business Machines Corporation and
4## others. All Rights Reserved.
5##
6## $Id: mh-os400,v 1.1.1.2 2003/07/03 18:13:33 avery Exp $
7
8GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
9GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
10
11DEFS+=-DOS400 -D_MULTI_THREADED
12
13## Commands to compile
14COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
15COMPILE.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)
20LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
21LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
22
23## Commands to make a shared library
24SHLIB.c= ld -v -qOPTION='*DUPPROC *DUPVAR'
25SHLIB.cc= ld -v -qOPTION='*DUPPROC *DUPVAR'
26AR = qar
27ARFLAGS = -cuv
28
29## Compiler switch to embed a runtime search path
30LD_RPATH= -I
31LD_RPATH_PRE= -I
32
33## Versioned target for a shared library.
34FINAL_SO_TARGET = $(SO_TARGET)
35MIDDLE_SO_TARGET =
36
37## object suffix
38TO= o
39
40## Shared object suffix
41SO= so
42## Non-shared intermediate object suffix
43STATIC_O = o
44
45## Platform command to remove or move executable target
46RMV = del
47## Platform commands to remove or move executable and library targets
48INSTALL-S = cp -fph
49INSTALL-L = $(INSTALL-S)
50
51## Link commands to link to ICU service programs
52LIBICUDT = $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX).$(SO)
53LIBICUUC = $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX).$(SO)
54LIBICUI18N = $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX).$(SO)
55LIBICULE = $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX).$(SO)
56LIBICULX = $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX).$(SO)
57LIBCTESTFW = $(top_builddir)/tools/ctestfw/$(LIBICU)ctestfw$(ICULIBSUFFIX).$(SO)
58LIBICUTOOLUTIL = $(top_builddir)/tools/toolutil/$(LIBICU)toolutil$(ICULIBSUFFIX).$(SO)
59LIBUSTDIO= $(top_builddir)/extra/ustdio/$(LIBICU)io$(ICULIBSUFFIX).$(SO)
60
61## Special OS400 rules
62
63## Build archive from shared object
64%.a : %.o
65 $(AR) $(ARFLAGS) $@ $<
66
67## Build import list from export list
68%.e : %.exp
69 @echo "Building an import list for $<"
70 @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
71
72## Compilation rules
73%.$(STATIC_O): $(srcdir)/%.c
74 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
75%.o: $(srcdir)/%.c
76 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
77
78%.$(STATIC_O): $(srcdir)/%.cpp
79 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
80%.o: $(srcdir)/%.cpp
81 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
82
83%.qwobj : $(srcdir)/%.c
84 $(COMPILE.c) -o $@ $<
85
86%.qwobj : $(srcdir)/%.cpp
87 $(COMPILE.cc) -o $@ $<
88
89## Dependency rules
90%.d : %.u
91# @$(SHELL) -ec 'cat $< \
92# | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
93# [ -s $@ ] || rm -f $@ ; rm -f $<'
94
95%.u : $(srcdir)/%.c
96 @echo "generating dependency information for $<"
97# @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
98# @$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
99
100%.u : $(srcdir)/%.cpp
101 @echo "generating dependency information for $<"
102# @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
103# @$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1'
104
105## End OS400-specific setup