2 ## IRIX-specific setup (for CC)
3 ## Copyright (c) 1999-2000, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## $Id: mh-irix,v 1.1.1.1 2003/02/05 21:31:17 avery Exp $
8 ## Flags for position independent code
9 SHAREDLIBCFLAGS = -shared
10 SHAREDLIBCXXFLAGS = -shared
13 ## Commands to generate dependency files
14 GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS)
15 GEN_DEPS.cc= $(CXX) -E -M $(DEFS) $(CPPFLAGS)
18 ## We need to use the C++ linker, even when linking C programs, since
19 ## our libraries contain C++ code (C++ static init not called)
20 #LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
21 LINK.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
22 LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
24 ## Commands to make a shared library
25 SHLIB.c= $(CC) -shared $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
26 SHLIB.cc= $(CXX) -shared $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
28 ## Compiler switch to embed a runtime search path
30 LD_RPATH_PRE= -Wl,-rpath,
32 ## Compiler switch to embed a library name
33 LD_SONAME = -Wl,-soname -Wl,$(MIDDLE_SO_TARGET)
35 ## Shared object suffix
37 ## Non-shared intermediate object suffix
41 %.$(STATIC_O): $(srcdir)/%.c
42 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
44 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
46 %.$(STATIC_O): $(srcdir)/%.cpp
47 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
49 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
51 ../data/%.o: ../data/%.c
52 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
56 @echo "generating dependency information for $<"
57 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
58 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
59 [ -s $@ ] || rm -f $@'
62 @echo "generating dependency information for $<"
63 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
64 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
65 [ -s $@ ] || rm -f $@'
67 ## Versioned libraries rules
69 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
70 $(RM) $@ && ln -s $< $@
71 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
72 $(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@
74 ## End IRIX-specific setup