030eecf6ae
X-SVN-Rev: 2694
123 lines
4.3 KiB
Makefile
123 lines
4.3 KiB
Makefile
## -*-makefile-*-
|
|
## 390-specific setup
|
|
## Copyright (c) 1999-2000, International Business Machines Corporation and
|
|
## others. All Rights Reserved.
|
|
##
|
|
## $Id: mh-os390,v 1.21 2000/10/16 18:05:34 yves Exp $
|
|
|
|
###################################################################
|
|
# IMPORTANT NOTE #
|
|
###################################################################
|
|
# Before you try to run the Makefile, make sure you have the #
|
|
# environment variables set. #
|
|
# #
|
|
# If you are going to do the OS390BATCH build, make sure you have #
|
|
# the OS390BATCH environment variable set. #
|
|
# #
|
|
# export OS390BATCH=1 #
|
|
# #
|
|
# To build a version of ICU which uses IEEE Floating point #
|
|
# #
|
|
# export IEEE390=1 #
|
|
# #
|
|
###################################################################
|
|
|
|
ifeq (${IEEE390}, 1)
|
|
ICU_IEEE = -Wc,"float(ieee)" -DIEEE_754=1
|
|
else
|
|
ICU_IEEE = -DIEEE_754=0
|
|
endif
|
|
|
|
CFLAGS390= -Wc,"langlvl(extended),spill(2000)" $(ICU_BUILD_OPTIONS) $(ICU_IEEE) -Wc,dll,expo
|
|
## OS390BATCH
|
|
ifeq (${OS390BATCH},1)
|
|
DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -DOS390BATCH -D_SHR_TZNAME -D_SHR_TIMEZONE
|
|
else
|
|
DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_SHR_TZNAME -D_SHR_TIMEZONE
|
|
endif
|
|
ARFLAGS= -cr
|
|
|
|
|
|
## Commands to generate dependency files
|
|
GEN_DEPS.c= makedep
|
|
GEN_DEPS.cc= makedep
|
|
|
|
## Commands to compile
|
|
COMPILE.c= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS390) $(DEFS390) -c
|
|
COMPILE.cc= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS390) $(DEFS390) -c
|
|
|
|
## Commands to link
|
|
LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
|
LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
## Commands for shared library (dll)
|
|
SHLIB.c= $(LINK.c) -Wl,dll
|
|
SHLIB.cc= $(LINK.cc) -Wl,dll
|
|
|
|
## Compiler switch to embed a runtime search path
|
|
LD_RPATH= -I
|
|
|
|
## Environment variable to set a runtime search path
|
|
LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
|
|
|
|
## Versioned target for a shared library.
|
|
FINAL_SO_TARGET = $(SO_TARGET)
|
|
MIDDLE_SO_TARGET =
|
|
|
|
### How ICU libraries are named... ex. $(LIBICU)uc$(SO)
|
|
## Prefix for the ICU library names
|
|
ICUPREFIX = icu
|
|
LIBICU = lib$(ICUPREFIX)
|
|
## Shared object suffix (switch to dll for shared library build)
|
|
SO= dll
|
|
## Non-shared intermediate object suffix
|
|
STATIC_O = o
|
|
|
|
## Force removal [for make clean]
|
|
RMV = rm -rf
|
|
## Platform commands to remove or move executable and library targets
|
|
INSTALL-S = $(INSTALL_PROGRAM)
|
|
INSTALL-L = $(INSTALL_DATA)
|
|
|
|
## Link commands to link to ICU libs
|
|
LIBICUUC= $(top_builddir)/common/libicuuc.x
|
|
LIBICUI18N= $(top_builddir)/i18n/libicui18n.x
|
|
LIBCTESTFW= $(top_builddir)/tools/ctestfw/libctestfw.x
|
|
LIBICUTOOLUTIL=$(top_builddir)/tools/toolutil/libicutoolutil.x
|
|
LIBUSTDIO= $(top_builddir)/extra/ustdio/libustdio.x
|
|
|
|
## Special 390 rules
|
|
|
|
## Build archive from object
|
|
%.a : $(OBJECTS)
|
|
$(AR) $(ARFLAGS) $@ $(OBJECTS)
|
|
|
|
## 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 $@ $<
|
|
|
|
## 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 390-specific setup
|