2 ## Solaris-specific setup using Sun's compilers
3 ## Copyright (c) 1999-2010, 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 ifeq ($(UCLN_NO_AUTO_CLEANUP),0)
17 UCLN_FINI = ucln_fini$(TARGET_STUBNAME)_$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIXCNAME)
18 CPPFLAGS_FINI = -DUCLN_FINI=$(UCLN_FINI)
19 LDFLAGS_FINI = -zfiniarray=$(UCLN_FINI)
21 CPPFLAGSICUUC += $(CPPFLAGS_FINI)
22 LDFLAGSICUUC += $(LDFLAGS_FINI)
23 CPPFLAGSICUIO += $(CPPFLAGS_FINI)
24 LDFLAGSICUIO += $(LDFLAGS_FINI)
25 CPPFLAGSICUI18N += $(CPPFLAGS_FINI)
26 LDFLAGSICUI18N += $(LDFLAGS_FINI)
27 CPPFLAGSCTESTFW += $(CPPFLAGS_FINI)
28 LDFLAGSCTESTFW += $(LDFLAGS_FINI)
30 # ICUUC, ICUIO, ICUI18N, CTESTFW
33 # -mt means 'compiles and links a multithreaded program'
35 THREADSCXXFLAGS += -mt
38 ## For Sun Workshop, use CC to link to bring in C++ runtime
39 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
40 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
42 ## Commands to make a shared library
43 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
44 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
46 ## Compiler switch to embed a runtime search path
47 LD_RPATH= -R'$$'ORIGIN
50 #LIBRARY_PATH_PREFIX=/usr/lib/lwp:
52 ## Compiler switch to embed a library name
53 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
55 ## Shared object suffix
57 ## Non-shared intermediate object suffix
61 %.$(STATIC_O): $(srcdir)/%.c
62 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
64 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
66 %.$(STATIC_O): $(srcdir)/%.cpp
67 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
69 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
74 @echo "generating dependency information for $<"
75 @$(GEN_DEPS.c) $< > $@
78 @echo "generating dependency information for $<"
79 @$(GEN_DEPS.cc) $< > $@
81 ## Versioned libraries rules
83 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
84 $(RM) $@ && ln -s ${<F} $@
85 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
86 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
89 ifeq (strip $(GENCCODE_ASSEMBLY),)
90 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
94 ## Remove shared library 's'
95 STATIC_PREFIX_WHEN_USED =
98 ## End Solaris-specific setup