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 | ## Darwin-specific setup (Darwin is the Mac OS X developer preview, successor |
michael@0 | 3 | ## to Rhapsody, aka Mac OS X Server) |
michael@0 | 4 | ## Copyright (c) 1999-2012 International Business Machines Corporation and |
michael@0 | 5 | ## others. All Rights Reserved. |
michael@0 | 6 | |
michael@0 | 7 | ## Flags for position independent code |
michael@0 | 8 | SHAREDLIBCFLAGS = -dynamic |
michael@0 | 9 | SHAREDLIBCXXFLAGS = -dynamic |
michael@0 | 10 | SHAREDLIBCPPFLAGS = |
michael@0 | 11 | |
michael@0 | 12 | # Do not export internal methods by default |
michael@0 | 13 | LIBCFLAGS += -fvisibility=hidden |
michael@0 | 14 | LIBCXXFLAGS += -fvisibility=hidden |
michael@0 | 15 | |
michael@0 | 16 | # Pad out the paths to the maximum possible length |
michael@0 | 17 | LD_FLAGS += -headerpad_max_install_names |
michael@0 | 18 | |
michael@0 | 19 | # We do not need to see the stderr message that the archive was made. |
michael@0 | 20 | ARFLAGS += -c |
michael@0 | 21 | |
michael@0 | 22 | ## Commands to compile |
michael@0 | 23 | COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -fno-common -c |
michael@0 | 24 | COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -fno-common -c |
michael@0 | 25 | |
michael@0 | 26 | ## Commands to make a shared library |
michael@0 | 27 | SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS) $(LD_SOOPTIONS) |
michael@0 | 28 | SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS) |
michael@0 | 29 | |
michael@0 | 30 | ## Compiler switches to embed a library name and version information |
michael@0 | 31 | LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(MIDDLE_SO_TARGET)) |
michael@0 | 32 | |
michael@0 | 33 | ## Compiler switch to embed a runtime search path |
michael@0 | 34 | LD_RPATH= |
michael@0 | 35 | LD_RPATH_PRE= -Wl,-rpath, |
michael@0 | 36 | |
michael@0 | 37 | ## Environment variable to set a runtime search path |
michael@0 | 38 | LDLIBRARYPATH_ENVVAR = DYLD_LIBRARY_PATH |
michael@0 | 39 | |
michael@0 | 40 | GENCCODE_ASSEMBLY=-a gcc-darwin |
michael@0 | 41 | |
michael@0 | 42 | ## Shared object suffix |
michael@0 | 43 | SO= dylib |
michael@0 | 44 | ## Non-shared intermediate object suffix |
michael@0 | 45 | STATIC_O = ao |
michael@0 | 46 | |
michael@0 | 47 | ## Override Versioned target for a shared library. |
michael@0 | 48 | FINAL_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO) |
michael@0 | 49 | MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO) |
michael@0 | 50 | |
michael@0 | 51 | ## Compilation and dependency rules |
michael@0 | 52 | %.$(STATIC_O): $(srcdir)/%.c |
michael@0 | 53 | $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -MMD -MT "$*.d $*.o $*.$(STATIC_O)" -o $@ $<) |
michael@0 | 54 | %.o: $(srcdir)/%.c |
michael@0 | 55 | $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS)) -MMD -MT "$*.d $*.o $*.$(STATIC_O)" -o $@ $<) |
michael@0 | 56 | |
michael@0 | 57 | %.$(STATIC_O): $(srcdir)/%.cpp |
michael@0 | 58 | $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -MMD -MT "$*.d $*.o $*.$(STATIC_O)" -o $@ $<) |
michael@0 | 59 | %.o: $(srcdir)/%.cpp |
michael@0 | 60 | $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS)) -MMD -MT "$*.d $*.o $*.$(STATIC_O)" -o $@ $<) |
michael@0 | 61 | |
michael@0 | 62 | ## Versioned libraries rules |
michael@0 | 63 | |
michael@0 | 64 | %.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO) |
michael@0 | 65 | $(RM) $@ && ln -s ${<F} $@ |
michael@0 | 66 | %.$(SO): %.$(SO_TARGET_VERSION_MAJOR).$(SO) |
michael@0 | 67 | $(RM) $@ && ln -s ${*F}.$(SO_TARGET_VERSION).$(SO) $@ |
michael@0 | 68 | |
michael@0 | 69 | # tzcode option |
michael@0 | 70 | TZORIG_EXTRA_CFLAGS=-DSTD_INSPIRED |
michael@0 | 71 | |
michael@0 | 72 | # genren opts |
michael@0 | 73 | GENREN_PL_OPTS=-x Mach-O -n '-g' -p '| c++filt' |
michael@0 | 74 | |
michael@0 | 75 | ## Remove shared library 's' |
michael@0 | 76 | STATIC_PREFIX_WHEN_USED = |
michael@0 | 77 | STATIC_PREFIX = |
michael@0 | 78 | |
michael@0 | 79 | ## End Darwin-specific setup |