2000-02-18 21:05:24 +00:00
|
|
|
## -*-makefile-*-
|
|
|
|
## OS400-specific setup (for cross build)
|
2001-03-21 20:31:13 +00:00
|
|
|
## Copyright (c) 1999-2001, International Business Machines Corporation and
|
2000-02-18 21:05:24 +00:00
|
|
|
## others. All Rights Reserved.
|
2000-10-16 18:05:34 +00:00
|
|
|
##
|
2001-06-01 18:15:03 +00:00
|
|
|
## $Id: mh-os400,v 1.13 2001/06/01 18:15:03 grhoten Exp $
|
2000-02-18 21:05:24 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2001-06-01 18:15:03 +00:00
|
|
|
## Special macro separator for compiling C++
|
|
|
|
## e.g. -D'U_SRCDATADIR=$(MACRO_SEPARATOR)"$(top_srcdir)/../data/"'
|
|
|
|
MACRO_SEPARATOR=\x40
|
|
|
|
|
2000-02-18 21:05:24 +00:00
|
|
|
## 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
|
|
|
|
|
2000-10-03 23:19:26 +00:00
|
|
|
## Environment variable to set a runtime search path
|
|
|
|
LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
|
|
|
|
|
2000-09-15 05:07:43 +00:00
|
|
|
## Versioned target for a shared library.
|
|
|
|
FINAL_SO_TARGET = $(SO_TARGET)
|
|
|
|
MIDDLE_SO_TARGET =
|
|
|
|
|
2000-05-13 00:13:15 +00:00
|
|
|
### How ICU libraries are named... ex. $(LIBICU)uc$(SO)
|
2000-10-12 23:31:09 +00:00
|
|
|
## Prefix for the ICU library names
|
2000-10-13 17:45:47 +00:00
|
|
|
ICUPREFIX = icu
|
|
|
|
LIBICU = lib$(ICUPREFIX)
|
2000-02-18 21:05:24 +00:00
|
|
|
## object suffix
|
|
|
|
TO= o
|
|
|
|
|
|
|
|
## Shared object suffix
|
|
|
|
SO= o
|
2000-10-09 19:06:57 +00:00
|
|
|
## Non-shared intermediate object suffix
|
|
|
|
STATIC_O = o
|
2000-02-18 21:05:24 +00:00
|
|
|
|
|
|
|
## Platform command to remove or move executable target
|
|
|
|
RMV = del
|
2000-10-03 22:51:46 +00:00
|
|
|
## Platform commands to remove or move executable and library targets
|
|
|
|
INSTALL-S = cp -fph
|
|
|
|
INSTALL-L = $(INSTALL-S)
|
2000-02-18 21:05:24 +00:00
|
|
|
|
|
|
|
## Link commands to link to ICU service programs
|
2001-02-20 00:47:25 +00:00
|
|
|
LIBICUUC = $(top_builddir)/common/libicuuc.o
|
|
|
|
LIBICUI18N = $(top_builddir)/i18n/libicui18n.o
|
|
|
|
LIBCTESTFW = $(top_builddir)/tools/ctestfw/libctestfw.o
|
|
|
|
LIBICUTOOLUTIL = $(top_builddir)/tools/toolutil/libicutoolutil.o
|
2000-03-29 20:17:28 +00:00
|
|
|
LIBUSTDIO= $(top_builddir)/extra/ustdio/libustdio.o
|
|
|
|
|
2000-02-18 21:05:24 +00:00
|
|
|
## 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
|
2000-10-09 19:06:57 +00:00
|
|
|
%.$(STATIC_O): $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
|
2000-02-18 21:05:24 +00:00
|
|
|
|
|
|
|
%.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
|