2 ## Solaris-specific setup using Sun's workshop compilers
3 ## Copyright (c) 1999-2004, 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 # -libmil means use the intrinsic library functions like strlen
18 # -mt means 'compiles and links a multithreaded program'
20 THREADSCXXFLAGS += -mt
23 ## For Sun Workshop, use CC to link to bring in C++ runtime
24 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
25 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
27 ## Commands to make a shared library
28 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
29 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
31 ## Compiler switch to embed a runtime search path
35 ## Compiler switch to embed a library name
36 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
38 ## The type of assembly needed when pkgdata is used for generating shared libraries.
39 GENCCODE_ASSEMBLY=-a sun
41 ## Shared object suffix
43 ## Non-shared intermediate object suffix
47 %.$(STATIC_O): $(srcdir)/%.c
48 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
50 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
52 %.$(STATIC_O): $(srcdir)/%.cpp
53 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
55 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
60 @echo "generating dependency information for $<"
61 @$(GEN_DEPS.c) $< > $@
64 @echo "generating dependency information for $<"
65 @$(GEN_DEPS.cc) $< > $@
67 ## Versioned libraries rules
69 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
70 $(RM) $@ && ln -s ${<F} $@
71 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
72 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
75 ifeq (strip $(GENCCODE_ASSEMBLY),)
76 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
77 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
81 ## End Solaris-specific setup