1999-12-30 06:56:08 +00:00
|
|
|
## -*-makefile-*-
|
|
|
|
## IRIX-specific setup (for CC)
|
2000-01-17 19:48:20 +00:00
|
|
|
## Copyright (c) 1999-2000, International Business Machines Corporation and
|
|
|
|
## others. All Rights Reserved.
|
2000-10-16 18:05:34 +00:00
|
|
|
##
|
2003-08-08 23:53:43 +00:00
|
|
|
## $Id: mh-irix,v 1.22 2003/08/08 23:53:43 grhoten-oss Exp $
|
1999-12-30 06:56:08 +00:00
|
|
|
|
2000-10-09 19:06:57 +00:00
|
|
|
## Flags for position independent code
|
|
|
|
SHAREDLIBCFLAGS = -shared
|
|
|
|
SHAREDLIBCXXFLAGS = -shared
|
|
|
|
SHAREDLIBCPPFLAGS =
|
1999-12-30 06:56:08 +00:00
|
|
|
|
|
|
|
## Commands to generate dependency files
|
|
|
|
GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS)
|
|
|
|
GEN_DEPS.cc= $(CXX) -E -M $(DEFS) $(CPPFLAGS)
|
|
|
|
|
|
|
|
## Commands to link
|
|
|
|
## We need to use the C++ linker, even when linking C programs, since
|
|
|
|
## our libraries contain C++ code (C++ static init not called)
|
|
|
|
#LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
|
|
|
LINK.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
|
|
|
|
## Commands to make a shared library
|
2001-10-03 23:32:12 +00:00
|
|
|
SHLIB.c= $(CC) -shared $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
SHLIB.cc= $(CXX) -shared $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
|
1999-12-30 06:56:08 +00:00
|
|
|
|
|
|
|
## Compiler switch to embed a runtime search path
|
2000-11-29 16:25:25 +00:00
|
|
|
LD_RPATH=
|
|
|
|
LD_RPATH_PRE= -Wl,-rpath,
|
1999-12-30 06:56:08 +00:00
|
|
|
|
2002-01-10 02:41:39 +00:00
|
|
|
## Compiler switch to embed a library name
|
|
|
|
LD_SONAME = -Wl,-soname -Wl,$(MIDDLE_SO_TARGET)
|
|
|
|
|
1999-12-30 06:56:08 +00:00
|
|
|
## Shared object suffix
|
|
|
|
SO= so
|
2000-10-09 19:06:57 +00:00
|
|
|
## Non-shared intermediate object suffix
|
2000-10-09 19:55:52 +00:00
|
|
|
STATIC_O = ao
|
1999-12-30 06:56:08 +00:00
|
|
|
|
|
|
|
## Compilation rules
|
2000-10-09 19:06:57 +00:00
|
|
|
%.$(STATIC_O): $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
|
|
|
|
|
2000-02-07 20:57:10 +00:00
|
|
|
|
1999-12-30 06:56:08 +00:00
|
|
|
## Dependency rules
|
|
|
|
%.d : $(srcdir)/%.c
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
1999-12-30 06:56:08 +00:00
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.c) $< \
|
|
|
|
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@'
|
|
|
|
|
|
|
|
%.d : $(srcdir)/%.cpp
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
1999-12-30 06:56:08 +00:00
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.cc) $< \
|
|
|
|
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@'
|
|
|
|
|
2002-01-10 02:41:39 +00:00
|
|
|
## Versioned libraries rules
|
|
|
|
|
|
|
|
%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
|
|
|
|
$(RM) $@ && ln -s $< $@
|
|
|
|
%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
|
|
|
|
$(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@
|
|
|
|
|
1999-12-30 06:56:08 +00:00
|
|
|
## End IRIX-specific setup
|