2 ## Solaris-specific setup using Sun's compilers
3 ## Copyright (c) 1999-2006, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## Flags for position independent code
7 SHAREDLIBCFLAGS = -KPIC
8 SHAREDLIBCXXFLAGS = -KPIC
9 SHAREDLIBCPPFLAGS = -DPIC
11 ## Commands to generate dependency files
12 GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS)
13 GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS)
15 # -mt means 'compiles and links a multithreaded program'
17 THREADSCXXFLAGS += -mt
20 ## For Sun Workshop, use CC to link to bring in C++ runtime
21 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
22 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
24 ## Commands to make a shared library
25 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
26 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
28 ## Compiler switch to embed a runtime search path
32 #LIBRARY_PATH_PREFIX=/usr/lib/lwp:
34 ## Compiler switch to embed a library name
35 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
37 ## Shared object suffix
39 ## Non-shared intermediate object suffix
43 %.$(STATIC_O): $(srcdir)/%.c
44 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
46 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
48 %.$(STATIC_O): $(srcdir)/%.cpp
49 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
51 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
56 @echo "generating dependency information for $<"
57 @$(GEN_DEPS.c) $< > $@
60 @echo "generating dependency information for $<"
61 @$(GEN_DEPS.cc) $< > $@
63 ## Versioned libraries rules
65 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
66 $(RM) $@ && ln -s ${<F} $@
67 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
68 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
71 ifeq (strip $(GENCCODE_ASSEMBLY),)
72 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
76 ## End Solaris-specific setup