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 | ## Cygwin-specific setup |
michael@0 | 3 | ## Copyright (c) 2001-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 -MM $(DEFS) $(CPPFLAGS) |
michael@0 | 8 | GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) |
michael@0 | 9 | |
michael@0 | 10 | ## Flags to create/use a static library |
michael@0 | 11 | ifneq ($(ENABLE_SHARED),YES) |
michael@0 | 12 | ## Make sure that the static libraries can be built and used |
michael@0 | 13 | CPPFLAGS += -DU_STATIC_IMPLEMENTATION |
michael@0 | 14 | else |
michael@0 | 15 | ## Make sure that the static libraries can be built |
michael@0 | 16 | STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION |
michael@0 | 17 | endif |
michael@0 | 18 | |
michael@0 | 19 | ## Flags for position independent code |
michael@0 | 20 | SHAREDLIBCFLAGS = |
michael@0 | 21 | SHAREDLIBCXXFLAGS = |
michael@0 | 22 | SHAREDLIBCPPFLAGS = -DPIC |
michael@0 | 23 | |
michael@0 | 24 | ## Additional flags when building libraries and with threads |
michael@0 | 25 | THREADSCPPFLAGS = -D_REENTRANT |
michael@0 | 26 | LIBCPPFLAGS = |
michael@0 | 27 | |
michael@0 | 28 | # Commands to link. Link with C++ in case static libraries are used. |
michael@0 | 29 | LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 30 | #LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 31 | |
michael@0 | 32 | ## Shared library options |
michael@0 | 33 | LD_SOOPTIONS= -Wl,-Bsymbolic |
michael@0 | 34 | |
michael@0 | 35 | ## Commands to make a shared library |
michael@0 | 36 | # $(subst) won't work in shell script. #M# at the end omits these |
michael@0 | 37 | # lines from the shell script (Make only) |
michael@0 | 38 | SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(subst cyg,lib,$@).$(A)#M# |
michael@0 | 39 | SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(subst cyg,lib,$@).$(A)#M# |
michael@0 | 40 | # the #SH# lines don't go through further postprocessing. |
michael@0 | 41 | # so, they must be valid shell script starting from column 4 |
michael@0 | 42 | #SH#SHLIB_c="$(CC) $(CFLAGS) $(LDFLAGS) -shared " |
michael@0 | 43 | #SH#SHLIB_cc="$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared " |
michael@0 | 44 | |
michael@0 | 45 | |
michael@0 | 46 | ## Compiler switch to embed a runtime search path |
michael@0 | 47 | LD_RPATH= |
michael@0 | 48 | LD_RPATH_PRE= -Wl,-rpath, |
michael@0 | 49 | |
michael@0 | 50 | ## Compiler switch to embed a library name |
michael@0 | 51 | LD_SONAME = |
michael@0 | 52 | |
michael@0 | 53 | ## Shared object suffix |
michael@0 | 54 | SO = dll |
michael@0 | 55 | ## Non-shared intermediate object suffix |
michael@0 | 56 | STATIC_O = ao |
michael@0 | 57 | LIBICU = cyg$(ICUPREFIX) |
michael@0 | 58 | ## To have an import library is better on Cygwin |
michael@0 | 59 | IMPORT_LIB_EXT = .dll.a |
michael@0 | 60 | |
michael@0 | 61 | ## Compilation rules |
michael@0 | 62 | %.$(STATIC_O): $(srcdir)/%.c |
michael@0 | 63 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< |
michael@0 | 64 | %.o: $(srcdir)/%.c |
michael@0 | 65 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< |
michael@0 | 66 | |
michael@0 | 67 | %.$(STATIC_O): $(srcdir)/%.cpp |
michael@0 | 68 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< |
michael@0 | 69 | %.o: $(srcdir)/%.cpp |
michael@0 | 70 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< |
michael@0 | 71 | |
michael@0 | 72 | |
michael@0 | 73 | ## Dependency rules |
michael@0 | 74 | %.d: $(srcdir)/%.c |
michael@0 | 75 | @echo "generating dependency information for $<" |
michael@0 | 76 | @echo -n "$@ " > $@ |
michael@0 | 77 | @$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE) |
michael@0 | 78 | |
michael@0 | 79 | %.d: $(srcdir)/%.cpp |
michael@0 | 80 | @echo "generating dependency information for $<" |
michael@0 | 81 | @echo -n "$@ " > $@ |
michael@0 | 82 | @$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE) |
michael@0 | 83 | |
michael@0 | 84 | ## Versioned target for a shared library. |
michael@0 | 85 | ## Since symbolic links don't work the same way on Windows, |
michael@0 | 86 | ## we only use the version major number. |
michael@0 | 87 | #FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO) |
michael@0 | 88 | FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) |
michael@0 | 89 | MIDDLE_SO_TARGET=$(FINAL_SO_TARGET) |
michael@0 | 90 | |
michael@0 | 91 | IMPORT_LIB = $(subst cyg,lib,$(FINAL_SO_TARGET)).$(A)#M# |
michael@0 | 92 | MIDDLE_IMPORT_LIB = $(subst cyg,lib,$(basename $(SO_TARGET)))$(SO_TARGET_VERSION_MAJOR).$(SO).$(A)#M# |
michael@0 | 93 | FINAL_IMPORT_LIB = $(IMPORT_LIB)#M# |
michael@0 | 94 | |
michael@0 | 95 | # The following is for Makefile.inc's use. |
michael@0 | 96 | ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) |
michael@0 | 97 | |
michael@0 | 98 | ## Versioned libraries rules |
michael@0 | 99 | #%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO) |
michael@0 | 100 | # $(RM) $@ && cp ${<F} $@ |
michael@0 | 101 | %.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO) |
michael@0 | 102 | $(RM) $(subst cyg,lib,$@).$(A) && ln -s $(subst cyg,lib,${<F}).$(A) $(subst cyg,lib,$@).$(A) |
michael@0 | 103 | |
michael@0 | 104 | ## Install libraries as executable |
michael@0 | 105 | INSTALL-L=$(INSTALL_PROGRAM) |
michael@0 | 106 | |
michael@0 | 107 | ## Bind internal references |
michael@0 | 108 | |
michael@0 | 109 | # LDflags that pkgdata will use |
michael@0 | 110 | BIR_LDFLAGS= -Wl,-Bsymbolic |
michael@0 | 111 | |
michael@0 | 112 | # Dependencies [i.e. map files] for the final library |
michael@0 | 113 | BIR_DEPS= |
michael@0 | 114 | |
michael@0 | 115 | # Environment variable to set a runtime search path |
michael@0 | 116 | LDLIBRARYPATH_ENVVAR = PATH |
michael@0 | 117 | |
michael@0 | 118 | # The type of assembly to write for generating an object file |
michael@0 | 119 | GENCCODE_ASSEMBLY=-a gcc-cygwin |
michael@0 | 120 | |
michael@0 | 121 | # put this here again so it gets cyguc... |
michael@0 | 122 | |
michael@0 | 123 | #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" |
michael@0 | 124 | |
michael@0 | 125 | # for icu-config |
michael@0 | 126 | |
michael@0 | 127 | #SH### copied from Makefile.inc |
michael@0 | 128 | #SH#ICULIBS_COMMON="-l${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 129 | #SH#ICULIBS_DATA="-l${LIBICU}${DATA_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 130 | #SH#ICULIBS_I18N="-l${LIBICU}${I18N_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 131 | #SH#ICULIBS_TOOLUTIL="-l${LIBICU}tu${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 132 | #SH#ICULIBS_CTESTFW="-l${LIBICU}ctestfw${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 133 | #SH#ICULIBS_ICUIO="-l${LIBICU}io${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 134 | #SH#ICULIBS_OBSOLETE="-l${LIBICU}obsolete${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 135 | #SH#ICULIBS_LAYOUT="-l${LIBICU}le${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 136 | #SH#ICULIBS_LAYOUTEX="-l${LIBICU}lx${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" |
michael@0 | 137 | #SH#ICULIBS_BASE="${LIBS} -L${libdir}" |
michael@0 | 138 | #SH#ICULIBS="${ICULIBS_BASE} ${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA}" |
michael@0 | 139 | |
michael@0 | 140 | ## End Cygwin-specific setup |
michael@0 | 141 |