2 ## Solaris-specific setup using gcc
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## Flags for position independent code
7 SHAREDLIBCFLAGS = -fPIC
8 SHAREDLIBCXXFLAGS = -fPIC
9 SHAREDLIBCPPFLAGS = -DPIC
11 ## Commands to generate dependency files
12 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
13 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
15 ## Compiler switch to embed a runtime search path
19 ## Compiler switch to embed a library name
20 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
22 ## The type of assembly needed when pkgdata is used for generating shared libraries.
23 GENCCODE_ASSEMBLY=-a sun
25 ## Shared object suffix
27 ## Non-shared intermediate object suffix
31 %.$(STATIC_O): $(srcdir)/%.c
32 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
34 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
36 %.$(STATIC_O): $(srcdir)/%.cpp
37 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
39 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
44 @echo "generating dependency information for $<"
45 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
46 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
47 [ -s $@ ] || rm -f $@'
50 @echo "generating dependency information for $<"
51 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
52 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
53 [ -s $@ ] || rm -f $@'
55 ## Versioned libraries rules
57 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
58 $(RM) $@ && ln -s ${<F} $@
59 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
60 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
62 ## End Solaris-specific setup