1999-12-30 06:56:08 +00:00
|
|
|
## -*-makefile-*-
|
2016-06-15 18:58:17 +00:00
|
|
|
## Copyright (C) 2016 and later: Unicode, Inc. and others.
|
|
|
|
## License & terms of use: http://www.unicode.org/copyright.html
|
1999-12-30 06:56:08 +00:00
|
|
|
## IRIX-specific setup (for CC)
|
2016-05-31 21:45:07 +00:00
|
|
|
## Copyright (c) 1999-2006, International Business Machines Corporation and
|
|
|
|
## others. All Rights Reserved.
|
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
|
|
|
|
2004-11-13 00:01:27 +00:00
|
|
|
## Additional flags when building libraries with thread safety
|
|
|
|
THREADSCPPFLAGS = -D_REENTRANT -D_PTHREADS
|
2006-03-23 18:51:51 +00:00
|
|
|
LIBCPPFLAGS =
|
2004-11-13 00:01:27 +00:00
|
|
|
|
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
|
2004-03-26 18:07:36 +00:00
|
|
|
LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
|
2002-01-10 02:41:39 +00:00
|
|
|
|
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)
|
2004-03-26 22:33:12 +00:00
|
|
|
$(RM) $@ && ln -s ${<F} $@
|
2002-01-10 02:41:39 +00:00
|
|
|
%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
|
2004-03-26 22:33:12 +00:00
|
|
|
$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
|
2002-01-10 02:41:39 +00:00
|
|
|
|
1999-12-30 06:56:08 +00:00
|
|
|
## End IRIX-specific setup
|