2000-06-28 22:26:59 +00:00
|
|
|
## -*-makefile-*-
|
2002-03-14 02:00:36 +00:00
|
|
|
## Aix-specific setup (for Visual Age 5+)
|
|
|
|
## Copyright (c) 1999-2002, International Business Machines Corporation and
|
2000-06-28 22:26:59 +00:00
|
|
|
## others. All Rights Reserved.
|
2000-10-16 18:05:34 +00:00
|
|
|
##
|
2003-08-08 23:53:43 +00:00
|
|
|
## $Id: mh-aix-va,v 1.28 2003/08/08 23:53:43 grhoten-oss Exp $
|
2000-06-28 22:26:59 +00:00
|
|
|
|
|
|
|
## Commands to generate dependency files
|
|
|
|
GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS)
|
|
|
|
GEN_DEPS.cc= $(CXX) -E -M $(DEFS) $(CPPFLAGS)
|
|
|
|
|
2002-07-29 21:33:32 +00:00
|
|
|
# -qroconst make the strings readonly, which is usually the default.
|
|
|
|
# This helps in the data library,
|
|
|
|
# -qproto assumes all functions are prototyped (for optimization)
|
|
|
|
CFLAGS += -qproto -qroconst
|
|
|
|
CXXFLAGS += -qproto -qroconst
|
2002-05-01 23:48:15 +00:00
|
|
|
|
|
|
|
LDFLAGS += -brtl -bh:5
|
2000-06-28 22:26:59 +00:00
|
|
|
|
2003-06-09 22:35:07 +00:00
|
|
|
## We need to delete things prior to linking, or else we'll get
|
|
|
|
## SEVERE ERROR: output file in use .. on AIX.
|
|
|
|
## But, shell script version should NOT delete target as we don't
|
|
|
|
## have $@ in that context. (SH = only shell script, icu-config)
|
|
|
|
AIX_PREDELETE=rm -f $@ ;
|
|
|
|
#SH# AIX_PREDELETE=
|
|
|
|
|
2000-06-28 22:26:59 +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)
|
2003-06-09 22:35:07 +00:00
|
|
|
LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
|
2000-06-28 22:26:59 +00:00
|
|
|
|
|
|
|
## Commands to make a shared library
|
2001-11-01 22:45:17 +00:00
|
|
|
## -G means -berok -brtl -bnortllib -bnosymbolic -bnoautoexp
|
|
|
|
## -bh:8 means halt on errors or worse. We don't display warnings about
|
|
|
|
## duplicate inline symbols.
|
2003-06-09 22:35:07 +00:00
|
|
|
SHLIB.c= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS)
|
|
|
|
SHLIB.cc= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS)
|
2000-06-28 22:26:59 +00:00
|
|
|
|
|
|
|
## Compiler switch to embed a runtime search path
|
|
|
|
LD_RPATH= -I
|
|
|
|
LD_RPATH_PRE=
|
|
|
|
|
2000-10-03 23:19:26 +00:00
|
|
|
## Environment variable to set a runtime search path
|
|
|
|
LDLIBRARYPATH_ENVVAR = LIBPATH
|
|
|
|
|
2002-03-14 02:00:36 +00:00
|
|
|
## Override Versioned target for a shared library.
|
2002-08-01 03:28:53 +00:00
|
|
|
FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
|
|
|
|
MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
|
2002-03-14 02:00:36 +00:00
|
|
|
|
2002-05-07 03:10:14 +00:00
|
|
|
# The following is for Makefile.inc's use.
|
|
|
|
ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
|
|
|
|
|
|
|
|
# this one is for icudefs.mk's use
|
|
|
|
SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
|
2002-03-14 02:00:36 +00:00
|
|
|
|
|
|
|
LD_SONAME =
|
|
|
|
|
2000-06-28 22:26:59 +00:00
|
|
|
## Shared object suffix
|
2001-10-26 20:25:31 +00:00
|
|
|
SO= so
|
2000-10-09 19:06:57 +00:00
|
|
|
## Non-shared intermediate object suffix
|
|
|
|
STATIC_O = o
|
2000-06-28 22:26:59 +00:00
|
|
|
|
|
|
|
## Build archive from shared object
|
|
|
|
%.a : %.so
|
|
|
|
$(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-06-28 22:26:59 +00:00
|
|
|
|
|
|
|
## Dependency rules
|
|
|
|
%.d : %.u
|
|
|
|
@$(SHELL) -ec 'cat $< \
|
|
|
|
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@ ; rm -f $<'
|
|
|
|
|
|
|
|
%.u : $(srcdir)/%.c
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
2001-10-26 20:25:31 +00:00
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.c) $< > /dev/null'
|
2000-06-28 22:26:59 +00:00
|
|
|
|
|
|
|
%.u : $(srcdir)/%.cpp
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
2001-10-26 20:25:31 +00:00
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.cc) $< > /dev/null'
|
|
|
|
|
|
|
|
## Versioned libraries rules
|
2002-08-01 03:28:53 +00:00
|
|
|
%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
|
|
|
|
$(RM) $@ && ln -s $*$(SO_TARGET_VERSION).$(SO) $@
|
|
|
|
%.$(SO): %$(SO_TARGET_VERSION).$(SO)
|
|
|
|
$(RM) $@ && ln -s $*$(SO_TARGET_VERSION).$(SO) $@
|
2000-06-28 22:26:59 +00:00
|
|
|
|
|
|
|
## End Aix-specific setup
|