Wed, 31 Dec 2014 06:09:35 +0100
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 | ## Aix-specific setup (for Visual Age 5+) |
michael@0 | 3 | ## Copyright (c) 1999-2010, International Business Machines Corporation and |
michael@0 | 4 | ## others. All Rights Reserved. |
michael@0 | 5 | |
michael@0 | 6 | ## Commands to generate dependency files |
michael@0 | 7 | GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS) |
michael@0 | 8 | GEN_DEPS.cc= $(CXX) -E -M $(DEFS) $(CPPFLAGS) |
michael@0 | 9 | |
michael@0 | 10 | # -qroconst make the strings readonly, which is usually the default. |
michael@0 | 11 | # This helps in the data library, |
michael@0 | 12 | # -qproto assumes all functions are prototyped (for optimization) |
michael@0 | 13 | # -qrtti turns on compiler RTTI, required beginning with ICU 4.6 |
michael@0 | 14 | CFLAGS += -qproto -qroconst |
michael@0 | 15 | CXXFLAGS += -qproto -qroconst -qrtti |
michael@0 | 16 | |
michael@0 | 17 | # If you readd this line, you must change the SO value |
michael@0 | 18 | #LDFLAGS += -brtl |
michael@0 | 19 | |
michael@0 | 20 | ifeq ($(UCLN_NO_AUTO_CLEANUP),0) |
michael@0 | 21 | # set up init point. |
michael@0 | 22 | UCLN_FINI = ucln_fini$(TARGET_STUBNAME)_$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIXCNAME) |
michael@0 | 23 | CPPFLAGS_FINI = -DUCLN_FINI=$(UCLN_FINI) |
michael@0 | 24 | LDFLAGS_FINI = -binitfini::$(UCLN_FINI) |
michael@0 | 25 | |
michael@0 | 26 | CPPFLAGSICUUC += $(CPPFLAGS_FINI) |
michael@0 | 27 | LDFLAGSICUUC += $(LDFLAGS_FINI) |
michael@0 | 28 | CPPFLAGSICUIO += $(CPPFLAGS_FINI) |
michael@0 | 29 | LDFLAGSICUIO += $(LDFLAGS_FINI) |
michael@0 | 30 | CPPFLAGSICUI18N += $(CPPFLAGS_FINI) |
michael@0 | 31 | LDFLAGSICUI18N += $(LDFLAGS_FINI) |
michael@0 | 32 | CPPFLAGSCTESTFW += $(CPPFLAGS_FINI) |
michael@0 | 33 | LDFLAGSCTESTFW += $(LDFLAGS_FINI) |
michael@0 | 34 | |
michael@0 | 35 | # ICUUC, ICUIO, ICUI18N, CTESTFW |
michael@0 | 36 | endif |
michael@0 | 37 | |
michael@0 | 38 | ## We need to delete things prior to linking, or else we'll get |
michael@0 | 39 | ## SEVERE ERROR: output file in use .. on AIX. |
michael@0 | 40 | ## But, shell script version should NOT delete target as we don't |
michael@0 | 41 | ## have $@ in that context. (SH = only shell script, icu-config) |
michael@0 | 42 | AIX_PREDELETE=rm -f $@ ; |
michael@0 | 43 | #SH# AIX_PREDELETE= |
michael@0 | 44 | |
michael@0 | 45 | ## Commands to link |
michael@0 | 46 | ## We need to use the C++ linker, even when linking C programs, since |
michael@0 | 47 | ## our libraries contain C++ code (C++ static init not called) |
michael@0 | 48 | LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 49 | LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 50 | |
michael@0 | 51 | ## Commands to make a shared library |
michael@0 | 52 | ## -G means -berok -brtl -bnortllib -bnosymbolic -bnoautoexp |
michael@0 | 53 | ## -bh:8 means halt on errors or worse. We don't display warnings about |
michael@0 | 54 | ## duplicate inline symbols. |
michael@0 | 55 | SHLIB.c= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS) |
michael@0 | 56 | SHLIB.cc= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS) |
michael@0 | 57 | |
michael@0 | 58 | ## Compiler switch to embed a runtime search path |
michael@0 | 59 | LD_RPATH= -I |
michael@0 | 60 | LD_RPATH_PRE= |
michael@0 | 61 | |
michael@0 | 62 | ## Environment variable to set a runtime search path |
michael@0 | 63 | LDLIBRARYPATH_ENVVAR = LIBPATH |
michael@0 | 64 | |
michael@0 | 65 | # The following is for Makefile.inc's use. |
michael@0 | 66 | ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) |
michael@0 | 67 | |
michael@0 | 68 | # this one is for icudefs.mk's use |
michael@0 | 69 | ifeq ($(ENABLE_SHARED),YES) |
michael@0 | 70 | SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR) |
michael@0 | 71 | endif |
michael@0 | 72 | |
michael@0 | 73 | LD_SONAME = |
michael@0 | 74 | |
michael@0 | 75 | ## The type of assembly needed when pkgdata is used for generating shared libraries. |
michael@0 | 76 | GENCCODE_ASSEMBLY=-a xlc |
michael@0 | 77 | |
michael@0 | 78 | ## Shared object suffix |
michael@0 | 79 | SOBJ= so |
michael@0 | 80 | # without the -brtl option, the library names use .a. AIX is funny that way. |
michael@0 | 81 | SO= a |
michael@0 | 82 | ## Non-shared intermediate object suffix |
michael@0 | 83 | STATIC_O = o |
michael@0 | 84 | |
michael@0 | 85 | ## Override Versioned target for a shared library. |
michael@0 | 86 | FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO) |
michael@0 | 87 | MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) |
michael@0 | 88 | SHARED_OBJECT = $(notdir $(FINAL_SO_TARGET:.$(SO)=.$(SOBJ))) |
michael@0 | 89 | SHARED_OBJECT_NO_VERSION= $(basename $(SO_TARGET)).$(SOBJ) |
michael@0 | 90 | |
michael@0 | 91 | ## Build archive from shared object |
michael@0 | 92 | %.a : %.so |
michael@0 | 93 | ln -f $< $(SHARED_OBJECT_NO_VERSION) |
michael@0 | 94 | $(AIX_PREDELETE) $(AR) $(ARFLAGS) $@ $(SHARED_OBJECT_NO_VERSION) |
michael@0 | 95 | rm -f $(SHARED_OBJECT_NO_VERSION) |
michael@0 | 96 | $(LIBDIR)/%.a : %.so |
michael@0 | 97 | ln -f $< $(SHARED_OBJECT_NO_VERSION) |
michael@0 | 98 | $(AIX_PREDELETE) $(AR) $(ARFLAGS) $@ $(SHARED_OBJECT_NO_VERSION) |
michael@0 | 99 | rm -f $(SHARED_OBJECT_NO_VERSION) |
michael@0 | 100 | |
michael@0 | 101 | ## Build import list from export list |
michael@0 | 102 | %.e : %.exp |
michael@0 | 103 | @echo "Building an import list for $<" |
michael@0 | 104 | @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@" |
michael@0 | 105 | |
michael@0 | 106 | ## Compilation rules |
michael@0 | 107 | %.$(STATIC_O): $(srcdir)/%.c |
michael@0 | 108 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< |
michael@0 | 109 | %.o: $(srcdir)/%.c |
michael@0 | 110 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< |
michael@0 | 111 | |
michael@0 | 112 | %.$(STATIC_O): $(srcdir)/%.cpp |
michael@0 | 113 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< |
michael@0 | 114 | %.o: $(srcdir)/%.cpp |
michael@0 | 115 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< |
michael@0 | 116 | |
michael@0 | 117 | |
michael@0 | 118 | ## Dependency rules |
michael@0 | 119 | %.d : %.u |
michael@0 | 120 | @$(SHELL) -ec 'cat $< \ |
michael@0 | 121 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ |
michael@0 | 122 | [ -s $@ ] || rm -f $@ ; rm -f $<' |
michael@0 | 123 | |
michael@0 | 124 | %.u : $(srcdir)/%.c |
michael@0 | 125 | @echo "generating dependency information for $<" |
michael@0 | 126 | @$(GEN_DEPS.c) $< > /dev/null |
michael@0 | 127 | |
michael@0 | 128 | %.u : $(srcdir)/%.cpp |
michael@0 | 129 | @echo "generating dependency information for $<" |
michael@0 | 130 | @$(GEN_DEPS.cc) $< > /dev/null |
michael@0 | 131 | |
michael@0 | 132 | ## Versioned libraries rules |
michael@0 | 133 | %$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO) |
michael@0 | 134 | $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@ |
michael@0 | 135 | %.$(SO): %$(SO_TARGET_VERSION).$(SO) |
michael@0 | 136 | $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@ |
michael@0 | 137 | |
michael@0 | 138 | ## End Aix-specific setup |