scuffed-code/icu4c/source/config/mh-os400
Markus Scherer 5a0029437c ICU-315 more S/390 changes
X-SVN-Rev: 1020
2000-03-29 20:17:28 +00:00

90 lines
2.5 KiB
Makefile

## -*-makefile-*-
## OS400-specific setup (for cross build)
## Copyright (c) 1999-2000, International Business Machines Corporation and
## others. All Rights Reserved.
# Note: 'LIBICU' would be set to 'libicu-' for unix builds.
LIBICU = libicu
GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
## Commands to compile
COMPILE.c= $(CC) $(DEFS) -DOS400 -D_MULTI_THREADED $(CPPFLAGS) $(CFLAGS) -c
COMPILE.cc= $(CXX) $(DEFS) -DOS400 -D_MULTI_THREADED $(CPPFLAGS) $(CXXFLAGS) -c
## Commands to link
## We need to use the C++ linker, even when linking C programs, since
## our libraries contain C++ code (C++ static init not called)
LINK.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
## Commands to make a shared library
SHLIB.c= ld -v -qOPTION='*DUPPROC *DUPVAR'
SHLIB.cc= ld -v -qOPTION='*DUPPROC *DUPVAR'
AR = qar
ARFLAGS = -cuv
## Compiler switch to embed a runtime search path
LD_RPATH= -I
LD_RPATH_PRE= -I
## object suffix
TO= o
## Shared object suffix
SO= o
## Platform command to remove or move executable target
RMV = del
INSTALL-S = cp -fph
## Link commands to link to ICU service programs
LIBICU-UC = $(top_srcdir)/common/libicuuc.o
LIBICU-I18N = $(top_srcdir)/i18n/libicui18n.o
LIBCTESTFW = $(top_srcdir)/tools/ctestfw/libctestfw.o
LIBICU-TOOLUTIL = $(top_srcdir)/tools/toolutil/libicutoolutil.o
LIBUSTDIO= $(top_builddir)/extra/ustdio/libustdio.o
## Special OS400 rules
## Build archive from shared object
%.a : %.o
$(AR) $(ARFLAGS) $@ $<
## Build import list from export list
%.e : %.exp
@echo "Building an import list for $<"
@$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
## Compilation rules
%.o : $(srcdir)/%.c
$(COMPILE.c) -o $@ $<
%.o : $(srcdir)/%.cpp
$(COMPILE.cc) -o $@ $<
%.qwobj : $(srcdir)/%.c
$(COMPILE.c) -o $@ $<
%.qwobj : $(srcdir)/%.cpp
$(COMPILE.cc) -o $@ $<
## Dependency rules
%.d : %.u
# @$(SHELL) -ec 'cat $< \
# | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
# [ -s $@ ] || rm -f $@ ; rm -f $<'
%.u : $(srcdir)/%.c
@echo "Generating dependency information for $<"
# @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
# @$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
%.u : $(srcdir)/%.cpp
@echo "Generating dependency information for $<"
# @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
# @$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1'
## End OS400-specific setup