2 ## OS400-specific setup (for cross build)
3 ## Copyright (c) 1999-2003, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## $Id: mh-os400,v 1.1.1.2 2003/07/03 18:13:33 avery Exp $
8 GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
9 GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
11 DEFS+=-DOS400 -D_MULTI_THREADED
13 ## Commands to compile
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
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'
23 ## Commands to make a shared library
24 SHLIB.c= ld -v -qOPTION='*DUPPROC *DUPVAR'
25 SHLIB.cc= ld -v -qOPTION='*DUPPROC *DUPVAR'
29 ## Compiler switch to embed a runtime search path
33 ## Versioned target for a shared library.
34 FINAL_SO_TARGET = $(SO_TARGET)
40 ## Shared object suffix
42 ## Non-shared intermediate object suffix
45 ## Platform command to remove or move executable target
47 ## Platform commands to remove or move executable and library targets
49 INSTALL-L = $(INSTALL-S)
51 ## Link commands to link to ICU service programs
52 LIBICUDT = $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX).$(SO)
53 LIBICUUC = $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX).$(SO)
54 LIBICUI18N = $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX).$(SO)
55 LIBICULE = $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX).$(SO)
56 LIBICULX = $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX).$(SO)
57 LIBCTESTFW = $(top_builddir)/tools/ctestfw/$(LIBICU)ctestfw$(ICULIBSUFFIX).$(SO)
58 LIBICUTOOLUTIL = $(top_builddir)/tools/toolutil/$(LIBICU)toolutil$(ICULIBSUFFIX).$(SO)
59 LIBUSTDIO= $(top_builddir)/extra/ustdio/$(LIBICU)io$(ICULIBSUFFIX).$(SO)
61 ## Special OS400 rules
63 ## Build archive from shared object
65 $(AR) $(ARFLAGS) $@ $<
67 ## Build import list from export list
69 @echo "Building an import list for $<"
70 @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
73 %.$(STATIC_O): $(srcdir)/%.c
74 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
76 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
78 %.$(STATIC_O): $(srcdir)/%.cpp
79 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
81 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
83 %.qwobj : $(srcdir)/%.c
86 %.qwobj : $(srcdir)/%.cpp
87 $(COMPILE.cc) -o $@ $<
91 # @$(SHELL) -ec 'cat $< \
92 # | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
93 # [ -s $@ ] || rm -f $@ ; rm -f $<'
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'
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'
105 ## End OS400-specific setup