]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-solaris
ICU-461.12.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
1 ## -*-makefile-*-
2 ## Solaris-specific setup using Sun's compilers
3 ## Copyright (c) 1999-2010, International Business Machines Corporation and
4 ## others. All Rights Reserved.
5
6 ## Flags for position independent code
7 SHAREDLIBCFLAGS = -KPIC
8 SHAREDLIBCXXFLAGS = -KPIC
9 SHAREDLIBCPPFLAGS = -DPIC
10
11 ## Commands to generate dependency files
12 GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS)
13 GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS)
14
15 ifeq ($(UCLN_NO_AUTO_CLEANUP),0)
16 # set up init point.
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)
20
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)
29
30 # ICUUC, ICUIO, ICUI18N, CTESTFW
31 endif
32
33 # -mt means 'compiles and links a multithreaded program'
34 THREADSCFLAGS += -mt
35 THREADSCXXFLAGS += -mt
36
37 ## Commands to link
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)
41
42 ## Commands to make a shared library
43 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
44 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
45
46 ## Compiler switch to embed a runtime search path
47 LD_RPATH= -R'$$'ORIGIN
48 LD_RPATH_PRE= -R
49
50 #LIBRARY_PATH_PREFIX=/usr/lib/lwp:
51
52 ## Compiler switch to embed a library name
53 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
54
55 ## Shared object suffix
56 SO= so
57 ## Non-shared intermediate object suffix
58 STATIC_O = o
59
60 ## Compilation rules
61 %.$(STATIC_O): $(srcdir)/%.c
62 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
63 %.o: $(srcdir)/%.c
64 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
65
66 %.$(STATIC_O): $(srcdir)/%.cpp
67 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
68 %.o: $(srcdir)/%.cpp
69 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
70
71
72 ## Dependency rules
73 %.d : $(srcdir)/%.c
74 @echo "generating dependency information for $<"
75 @$(GEN_DEPS.c) $< > $@
76
77 %.d : $(srcdir)/%.cpp
78 @echo "generating dependency information for $<"
79 @$(GEN_DEPS.cc) $< > $@
80
81 ## Versioned libraries rules
82
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) $@
87
88 #
89 ifeq (strip $(GENCCODE_ASSEMBLY),)
90 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
91 BIR_DEPS= $(NAME).map
92 endif
93
94 ## Remove shared library 's'
95 STATIC_PREFIX_WHEN_USED =
96 STATIC_PREFIX =
97
98 ## End Solaris-specific setup