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 | ## HPUX/gcc specific setup |
michael@0 | 3 | ## Copyright (c) 1999-2012, 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 for position independent code |
michael@0 | 11 | SHAREDLIBCFLAGS = -fPIC |
michael@0 | 12 | SHAREDLIBCXXFLAGS = -fPIC |
michael@0 | 13 | SHAREDLIBCPPFLAGS = -DPIC |
michael@0 | 14 | |
michael@0 | 15 | ## Common 'default' path to ensure the sanity of users. Search the current |
michael@0 | 16 | ## directory, at least. |
michael@0 | 17 | LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/ |
michael@0 | 18 | |
michael@0 | 19 | # Need to override this or we will get unworking assembly |
michael@0 | 20 | #GENCCODE_ASSEMBLY=-a gcc |
michael@0 | 21 | GENCCODE_ASSEMBLY= |
michael@0 | 22 | |
michael@0 | 23 | # Get some handy functions defined properly |
michael@0 | 24 | DEFS += -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L |
michael@0 | 25 | |
michael@0 | 26 | ## Commands to link |
michael@0 | 27 | ## For aCC, use the C++ linker so that __shlinit gets defined |
michael@0 | 28 | LINK.c= $(CXX) $(DEFS) $(LDFLAGS) -Wl,+s $(LD_DEFAULTPATH) |
michael@0 | 29 | LINK.cc= $(CXX) $(DEFS) $(LDFLAGS) -Wl,+s $(LD_DEFAULTPATH) |
michael@0 | 30 | |
michael@0 | 31 | ## Shared library options |
michael@0 | 32 | LD_SOOPTIONS= -Wl,-Bsymbolic |
michael@0 | 33 | |
michael@0 | 34 | ## Commands to make a shared library |
michael@0 | 35 | SHLIB.c= $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) $(SHAREDLIBCXXFLAGS) -shared -Wl,+s $(LD_DEFAULTPATH) $(LD_SOOPTIONS) |
michael@0 | 36 | SHLIB.cc= $(CXX) $(DEFS) $(CXXFLAGS) $(LDFLAGS) $(SHAREDLIBCXXFLAGS) -shared -Wl,+s $(LD_DEFAULTPATH) $(LD_SOOPTIONS) |
michael@0 | 37 | |
michael@0 | 38 | ## Compiler switch to embed a runtime search path |
michael@0 | 39 | LD_RPATH= -Wl,+b, |
michael@0 | 40 | LD_RPATH_PRE= |
michael@0 | 41 | |
michael@0 | 42 | ## Compiler switch to embed a library name |
michael@0 | 43 | LD_SONAME = -Wl,+h,$(notdir $(MIDDLE_SO_TARGET)) |
michael@0 | 44 | |
michael@0 | 45 | ## Environment variable to set a runtime search path |
michael@0 | 46 | LDLIBRARYPATH_ENVVAR = SHLIB_PATH |
michael@0 | 47 | |
michael@0 | 48 | ## Shared object suffix |
michael@0 | 49 | SO= sl |
michael@0 | 50 | ## Non-shared intermediate object suffix |
michael@0 | 51 | STATIC_O = o |
michael@0 | 52 | |
michael@0 | 53 | ## Compilation rules |
michael@0 | 54 | %.$(STATIC_O): $(srcdir)/%.c |
michael@0 | 55 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< |
michael@0 | 56 | %.o: $(srcdir)/%.c |
michael@0 | 57 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< |
michael@0 | 58 | |
michael@0 | 59 | %.$(STATIC_O): $(srcdir)/%.cpp |
michael@0 | 60 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< |
michael@0 | 61 | %.o: $(srcdir)/%.cpp |
michael@0 | 62 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< |
michael@0 | 63 | |
michael@0 | 64 | |
michael@0 | 65 | ## Dependency rules |
michael@0 | 66 | %.d : $(srcdir)/%.c |
michael@0 | 67 | @echo "Generating dependency information for $<" |
michael@0 | 68 | @$(SHELL) -ec '$(GEN_DEPS.c) $< \ |
michael@0 | 69 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ |
michael@0 | 70 | [ -s $@ ] || rm -f $@' |
michael@0 | 71 | |
michael@0 | 72 | %.d : $(srcdir)/%.cpp |
michael@0 | 73 | @echo "Generating dependency information for $<" |
michael@0 | 74 | @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ |
michael@0 | 75 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ |
michael@0 | 76 | [ -s $@ ] || rm -f $@' |
michael@0 | 77 | |
michael@0 | 78 | ## Versioned libraries rules |
michael@0 | 79 | |
michael@0 | 80 | %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) |
michael@0 | 81 | $(RM) $@ && ln -s ${<F} $@ |
michael@0 | 82 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) |
michael@0 | 83 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ |
michael@0 | 84 | |
michael@0 | 85 | ## Remove shared library 's' |
michael@0 | 86 | STATIC_PREFIX_WHEN_USED = |
michael@0 | 87 | STATIC_PREFIX = |
michael@0 | 88 | |
michael@0 | 89 | ## End HPUX/gcc specific setup |
michael@0 | 90 |