1999-09-03 22:08:47 +00:00
|
|
|
## -*-makefile-*-
|
1999-08-16 21:50:52 +00:00
|
|
|
## Solaris-specific setup using gcc
|
2010-06-01 23:35:40 +00:00
|
|
|
## Copyright (c) 1999-2010, International Business Machines Corporation and
|
2000-01-17 19:48:20 +00:00
|
|
|
## others. All Rights Reserved.
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-10-09 19:06:57 +00:00
|
|
|
## Flags for position independent code
|
|
|
|
SHAREDLIBCFLAGS = -fPIC
|
|
|
|
SHAREDLIBCXXFLAGS = -fPIC
|
|
|
|
SHAREDLIBCPPFLAGS = -DPIC
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
## Commands to generate dependency files
|
2002-05-01 23:48:15 +00:00
|
|
|
GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
|
1999-08-16 21:50:52 +00:00
|
|
|
GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
|
|
|
|
|
2006-07-13 18:59:42 +00:00
|
|
|
## These are the library specific LDFLAGS
|
|
|
|
LDFLAGSICUDT=-nodefaultlibs -nostdlib
|
|
|
|
|
2006-07-13 07:38:31 +00:00
|
|
|
## Additional flags when building libraries and with threads
|
|
|
|
THREADSCPPFLAGS = -D_REENTRANT
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
## Compiler switch to embed a runtime search path
|
2010-06-01 23:35:40 +00:00
|
|
|
LD_RPATH= -R'$$'ORIGIN
|
2009-07-30 20:45:53 +00:00
|
|
|
LD_RPATH_PRE= -R
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-10-17 16:52:58 +00:00
|
|
|
## Compiler switch to embed a library name
|
2004-03-26 18:07:36 +00:00
|
|
|
LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
|
2000-10-17 16:52:58 +00:00
|
|
|
|
2009-07-14 16:50:23 +00:00
|
|
|
## Shared library options
|
|
|
|
LD_SOOPTIONS= -Wl,-Bsymbolic
|
|
|
|
|
2004-03-10 17:57:37 +00:00
|
|
|
## The type of assembly needed when pkgdata is used for generating shared libraries.
|
2005-03-22 18:47:21 +00:00
|
|
|
## Only use this when not on x86 Solaris.
|
|
|
|
ifeq (strip $(GENCCODE_ASSEMBLY),)
|
2004-03-10 21:47:02 +00:00
|
|
|
GENCCODE_ASSEMBLY=-a sun
|
2005-03-22 18:47:21 +00:00
|
|
|
endif
|
2004-03-10 17:57:37 +00:00
|
|
|
|
1999-08-16 21:50:52 +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-08-16 21:50:52 +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-08-16 21:50:52 +00:00
|
|
|
## Dependency rules
|
|
|
|
%.d : $(srcdir)/%.c
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
1999-08-16 21:50:52 +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-08-16 21:50:52 +00:00
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.cc) $< \
|
|
|
|
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@'
|
|
|
|
|
2000-09-15 05:07:43 +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} $@
|
2000-09-15 05:07:43 +00:00
|
|
|
%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
|
2004-03-26 22:33:12 +00:00
|
|
|
$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
|
2000-09-15 05:07:43 +00:00
|
|
|
|
2009-08-27 01:19:35 +00:00
|
|
|
## Remove shared library 's'
|
|
|
|
STATIC_PREFIX_WHEN_USED =
|
|
|
|
STATIC_PREFIX =
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
## End Solaris-specific setup
|