965742a9d9
X-SVN-Rev: 14831
104 lines
3.1 KiB
Makefile
104 lines
3.1 KiB
Makefile
## -*-makefile-*-
|
|
## OS400-specific setup (for cross build)
|
|
## Copyright (c) 1999-2004, International Business Machines Corporation and
|
|
## others. All Rights Reserved.
|
|
|
|
GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
|
|
GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
|
|
|
|
DEFS+=-DOS400 -D_MULTI_THREADED
|
|
|
|
## Commands to compile
|
|
COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
|
|
COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
|
|
|
|
## 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) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
|
|
LINK.cc= $(CXX) $(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
|
|
|
|
## Versioned target for a shared library.
|
|
FINAL_SO_TARGET = $(SO_TARGET)
|
|
MIDDLE_SO_TARGET =
|
|
|
|
## object suffix
|
|
TO= o
|
|
|
|
## Shared object suffix
|
|
SO= so
|
|
## Non-shared intermediate object suffix
|
|
STATIC_O = o
|
|
|
|
## Platform command to remove or move executable target
|
|
RMV = del
|
|
## Platform commands to remove or move executable and library targets
|
|
INSTALL-S = cp -fph
|
|
INSTALL-L = $(INSTALL-S)
|
|
|
|
## Link commands to link to ICU service programs
|
|
LIBICUDT = $(LIBDIR)/$(LIBICU)data$(ICULIBSUFFIX).$(SO)
|
|
LIBICUUC = $(LIBDIR)/$(LIBICU)uc$(ICULIBSUFFIX).$(SO)
|
|
LIBICUI18N = $(LIBDIR)/$(LIBICU)i18n$(ICULIBSUFFIX).$(SO)
|
|
LIBICULE = $(LIBDIR)/$(LIBICU)le$(ICULIBSUFFIX).$(SO)
|
|
LIBICULX = $(LIBDIR)/$(LIBICU)lx$(ICULIBSUFFIX).$(SO)
|
|
LIBCTESTFW = $(top_builddir)/tools/ctestfw/$(LIBICU)ctestfw$(ICULIBSUFFIX).$(SO)
|
|
LIBICUTOOLUTIL = $(LIBDIR)/$(LIBICU)tu$(ICULIBSUFFIX).$(SO)
|
|
LIBICUIO= $(LIBDIR)/$(LIBICU)io$(ICULIBSUFFIX).$(SO)
|
|
|
|
## 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
|
|
%.$(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 $@ $<
|
|
|
|
%.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
|