intl/icu/source/config/mh-aix-gcc

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 ## -*-makefile-*-
michael@0 2 ## Copyright (c) 2003-2009 IBM, Ken Foskey, and others. All rights reserved.
michael@0 3 ##
michael@0 4 ## Aix-specific setup (for gcc)
michael@0 5 ##
michael@0 6 ## Please note: AIX does NOT have library versioning per se (there is no 'SONAME' capability).
michael@0 7 ## So, we are using 'windows' style library names, that is, libicuuc20.1.so instead of libicuuc.so.20.1
michael@0 8
michael@0 9 # Certain files don't compile in -ansi mode (e.g. umutex.c, toolutil.c, and cdatatst.c)
michael@0 10 CFLAGS += -D_ALL_SOURCE
michael@0 11
michael@0 12 ## Commands to generate dependency files
michael@0 13 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
michael@0 14 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
michael@0 15
michael@0 16 ## Commands to link
michael@0 17 ## We need to use the C++ linker, even when linking C programs, since
michael@0 18 ## our libraries contain C++ code (C++ static init not called)
michael@0 19 LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
michael@0 20 LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
michael@0 21
michael@0 22 ## Shared library options
michael@0 23 LD_SOOPTIONS= -Wl,-bsymbolic
michael@0 24
michael@0 25 ## Commands to make a shared library
michael@0 26 SHLIB.c= $(AIX_PREDELETE) $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS)
michael@0 27 SHLIB.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS)
michael@0 28
michael@0 29 ## Compiler switch to embed a runtime search path
michael@0 30 LD_RPATH= -I
michael@0 31 LD_RPATH_PRE=
michael@0 32
michael@0 33 ## enable the shared lib loader
michael@0 34 LDFLAGS += -Wl,-bbigtoc
michael@0 35
michael@0 36 ## These are the library specific LDFLAGS
michael@0 37 LDFLAGSICUDT=-nodefaultlibs -nostdlib
michael@0 38
michael@0 39 ## We need to delete things prior to linking, or else we'll get
michael@0 40 ## SEVERE ERROR: output file in use .. on AIX.
michael@0 41 ## But, shell script version should NOT delete target as we don't
michael@0 42 ## have $@ in that context. (SH = only shell script, icu-config)
michael@0 43 AIX_PREDELETE=rm -f $@ ;
michael@0 44 #SH# AIX_PREDELETE=
michael@0 45
michael@0 46 ## Environment variable to set a runtime search path
michael@0 47 LDLIBRARYPATH_ENVVAR = LIBPATH
michael@0 48
michael@0 49 ## Override Versioned target for a shared library.
michael@0 50 FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
michael@0 51 MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
michael@0 52 SHARED_OBJECT = $(notdir $(FINAL_SO_TARGET:.$(SO)=.$(SOBJ)))
michael@0 53 SHARED_OBJECT_NO_VERSION = $(basename $(SO_TARGET)).$(SOBJ)
michael@0 54
michael@0 55 # The following is for Makefile.inc's use.
michael@0 56 ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
michael@0 57
michael@0 58 # this one is for icudefs.mk's use
michael@0 59 ifeq ($(ENABLE_SHARED),YES)
michael@0 60 SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
michael@0 61 endif
michael@0 62
michael@0 63 ## Compiler switch to embed a library name. Not present on AIX.
michael@0 64 LD_SONAME =
michael@0 65
michael@0 66 ## The type of assembly needed when pkgdata is used for generating shared libraries.
michael@0 67 GENCCODE_ASSEMBLY=-a xlc
michael@0 68
michael@0 69 ## Shared object suffix
michael@0 70 SOBJ= so
michael@0 71 # without the -brtl option, the library names use .a. AIX is funny that way.
michael@0 72 SO= a
michael@0 73 A= a
michael@0 74
michael@0 75 ## Non-shared intermediate object suffix
michael@0 76 STATIC_O = o
michael@0 77
michael@0 78 ## Special AIX rules
michael@0 79
michael@0 80 ## Build archive from shared object
michael@0 81 %.a : %.so
michael@0 82 ln -f $< $(SHARED_OBJECT_NO_VERSION)
michael@0 83 $(AR) $(ARFLAGS) $@ $(SHARED_OBJECT_NO_VERSION)
michael@0 84 rm -f $(SHARED_OBJECT_NO_VERSION)
michael@0 85 $(LIBDIR)/%.a : %.so
michael@0 86 ln -f $< $(SHARED_OBJECT_NO_VERSION)
michael@0 87 $(AR) $(ARFLAGS) $@ $(SHARED_OBJECT_NO_VERSION)
michael@0 88 rm -f $(SHARED_OBJECT_NO_VERSION)
michael@0 89
michael@0 90 ## Build import list from export list
michael@0 91 %.e : %.exp
michael@0 92 @echo "Building an import list for $<"
michael@0 93 @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
michael@0 94
michael@0 95 ## Compilation rules
michael@0 96 %.$(STATIC_O): $(srcdir)/%.c
michael@0 97 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
michael@0 98 %.o: $(srcdir)/%.c
michael@0 99 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
michael@0 100
michael@0 101 %.$(STATIC_O): $(srcdir)/%.cpp
michael@0 102 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
michael@0 103 %.o: $(srcdir)/%.cpp
michael@0 104 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
michael@0 105
michael@0 106
michael@0 107 ## Dependency rules
michael@0 108 %.d: $(srcdir)/%.c
michael@0 109 @echo "generating dependency information for $<"
michael@0 110 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
michael@0 111 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
michael@0 112 [ -s $@ ] || rm -f $@'
michael@0 113
michael@0 114 %.d: $(srcdir)/%.cpp
michael@0 115 @echo "generating dependency information for $<"
michael@0 116 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
michael@0 117 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
michael@0 118 [ -s $@ ] || rm -f $@'
michael@0 119
michael@0 120 ## Versioned libraries rules
michael@0 121 %$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
michael@0 122 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
michael@0 123 %.$(SO): %$(SO_TARGET_VERSION).$(SO)
michael@0 124 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
michael@0 125
michael@0 126
michael@0 127 ## BIR - bind with internal references [so app data and icu data doesn't collide]
michael@0 128 # LDflags that pkgdata will use
michael@0 129 BIR_LDFLAGS= -Wl,-bE:$(NAME).map,-bnoexpall
michael@0 130
michael@0 131 # Dependencies [i.e. map files] for the final library
michael@0 132 BIR_DEPS= $(NAME).map
michael@0 133

mercurial