2 ## OS400-specific setup (for cross build)
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
7 GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
10 THREADSCPPFLAGS = -D_MULTI_THREADED
12 ## Commands to compile
13 # -qTERASPACE: large pointers
14 # -qPFROPT=*STRDONLY: Strings are read-only
15 COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
16 COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
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)
21 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
22 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
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.
29 SHLIB.c= ld -v -qOPTION='*DUPPROC *DUPVAR' -qALWLIBUPD=*YES
30 SHLIB.cc= ld -v -qOPTION='*DUPPROC *DUPVAR' -qALWLIBUPD=*YES
34 ## Compiler switch to embed a runtime search path
38 ## Make target to rebind the common library
39 ## to the actual data versus the stub data
40 POST_DATA_BUILD = os400-data-rebind
42 # The stubdata directory is the same directory as the normal data library.
43 STUBDATA_LIBDIR = $(LIBDIR)/
45 ## Versioned target for a shared library.
46 FINAL_SO_TARGET = $(SO_TARGET)
49 # this one is for icudefs.mk's use
50 ifeq ($(ENABLE_SHARED),YES)
51 SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
54 # this one is for the individual make files and linking
55 ICULIBSUFFIX = $(SO_TARGET_VERSION_SUFFIX)
60 ## Shared object suffix
62 ## Non-shared intermediate object suffix
65 ## Platform command to remove or move executable target
67 ## Platform commands to remove or move executable and library targets
69 INSTALL-L = $(INSTALL-S)
71 # Stub name overrides for iSeries
76 ## Link commands to link to ICU service programs
77 LIBICUDT = $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).$(SO)
78 LIBICUUC = $(LIBDIR)/$(LIBICU)$(COMMON_STUBNAME)$(ICULIBSUFFIX).$(SO)
79 LIBICUI18N = $(LIBDIR)/$(LIBICU)$(I18N_STUBNAME)$(ICULIBSUFFIX).$(SO)
80 LIBICULE = $(LIBDIR)/$(LIBICU)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX).$(SO)
81 LIBICULX = $(LIBDIR)/$(LIBICU)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX).$(SO)
82 LIBCTESTFW = $(top_builddir)/tools/ctestfw/$(LIBICU)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX).$(SO)
83 LIBICUTOOLUTIL = $(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).$(SO)
84 LIBICUIO= $(LIBDIR)/$(LIBICU)$(IO_STUBNAME)$(ICULIBSUFFIX).$(SO)
86 ## Special OS400 rules
88 ## Build archive from shared object
90 $(AR) $(ARFLAGS) $@ $<
92 ## Build import list from export list
94 @echo "Building an import list for $<"
95 @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
98 %.$(STATIC_O): $(srcdir)/%.c
99 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
101 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
103 %.$(STATIC_O): $(srcdir)/%.cpp
104 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
106 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
108 %.qwobj : $(srcdir)/%.c
109 $(COMPILE.c) -o $@ $<
111 %.qwobj : $(srcdir)/%.cpp
112 $(COMPILE.cc) -o $@ $<
116 # @$(SHELL) -ec 'cat $< \
117 # | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
118 # [ -s $@ ] || rm -f $@ ; rm -f $<'
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'
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'
130 ## End OS400-specific setup