Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | ## -*-makefile-*- |
michael@0 | 2 | ## IRIX-specific setup (for CC) |
michael@0 | 3 | ## Copyright (c) 1999-2006, International Business Machines Corporation and |
michael@0 | 4 | ## others. All Rights Reserved. |
michael@0 | 5 | |
michael@0 | 6 | ## Flags for position independent code |
michael@0 | 7 | SHAREDLIBCFLAGS = -shared |
michael@0 | 8 | SHAREDLIBCXXFLAGS = -shared |
michael@0 | 9 | SHAREDLIBCPPFLAGS = |
michael@0 | 10 | |
michael@0 | 11 | ## Commands to generate dependency files |
michael@0 | 12 | GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS) |
michael@0 | 13 | GEN_DEPS.cc= $(CXX) -E -M $(DEFS) $(CPPFLAGS) |
michael@0 | 14 | |
michael@0 | 15 | ## Commands to link |
michael@0 | 16 | ## We need to use the C++ linker, even when linking C programs, since |
michael@0 | 17 | ## our libraries contain C++ code (C++ static init not called) |
michael@0 | 18 | #LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) |
michael@0 | 19 | LINK.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 20 | LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 21 | |
michael@0 | 22 | ## Commands to make a shared library |
michael@0 | 23 | SHLIB.c= $(CC) -shared $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 24 | SHLIB.cc= $(CXX) -shared $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 25 | |
michael@0 | 26 | ## Additional flags when building libraries with thread safety |
michael@0 | 27 | THREADSCPPFLAGS = -D_REENTRANT -D_PTHREADS |
michael@0 | 28 | LIBCPPFLAGS = |
michael@0 | 29 | |
michael@0 | 30 | ## Compiler switch to embed a runtime search path |
michael@0 | 31 | LD_RPATH= |
michael@0 | 32 | LD_RPATH_PRE= -Wl,-rpath, |
michael@0 | 33 | |
michael@0 | 34 | ## Compiler switch to embed a library name |
michael@0 | 35 | LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) |
michael@0 | 36 | |
michael@0 | 37 | ## Shared object suffix |
michael@0 | 38 | SO= so |
michael@0 | 39 | ## Non-shared intermediate object suffix |
michael@0 | 40 | STATIC_O = ao |
michael@0 | 41 | |
michael@0 | 42 | ## Compilation rules |
michael@0 | 43 | %.$(STATIC_O): $(srcdir)/%.c |
michael@0 | 44 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< |
michael@0 | 45 | %.o: $(srcdir)/%.c |
michael@0 | 46 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< |
michael@0 | 47 | |
michael@0 | 48 | %.$(STATIC_O): $(srcdir)/%.cpp |
michael@0 | 49 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< |
michael@0 | 50 | %.o: $(srcdir)/%.cpp |
michael@0 | 51 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< |
michael@0 | 52 | |
michael@0 | 53 | |
michael@0 | 54 | ## Dependency rules |
michael@0 | 55 | %.d : $(srcdir)/%.c |
michael@0 | 56 | @echo "generating dependency information for $<" |
michael@0 | 57 | @$(SHELL) -ec '$(GEN_DEPS.c) $< \ |
michael@0 | 58 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ |
michael@0 | 59 | [ -s $@ ] || rm -f $@' |
michael@0 | 60 | |
michael@0 | 61 | %.d : $(srcdir)/%.cpp |
michael@0 | 62 | @echo "generating dependency information for $<" |
michael@0 | 63 | @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ |
michael@0 | 64 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ |
michael@0 | 65 | [ -s $@ ] || rm -f $@' |
michael@0 | 66 | |
michael@0 | 67 | ## Versioned libraries rules |
michael@0 | 68 | |
michael@0 | 69 | %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) |
michael@0 | 70 | $(RM) $@ && ln -s ${<F} $@ |
michael@0 | 71 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) |
michael@0 | 72 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ |
michael@0 | 73 | |
michael@0 | 74 | ## End IRIX-specific setup |