]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-solaris
ICU-551.24.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
CommitLineData
b75a7d8f 1## -*-makefile-*-
73c04bcf 2## Solaris-specific setup using Sun's compilers
729e4ab9 3## Copyright (c) 1999-2010, International Business Machines Corporation and
b75a7d8f 4## others. All Rights Reserved.
b75a7d8f
A
5
6## Flags for position independent code
7SHAREDLIBCFLAGS = -KPIC
8SHAREDLIBCXXFLAGS = -KPIC
9SHAREDLIBCPPFLAGS = -DPIC
10
11## Commands to generate dependency files
12GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS)
13GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS)
14
729e4ab9
A
15ifeq ($(UCLN_NO_AUTO_CLEANUP),0)
16# set up init point.
17UCLN_FINI = ucln_fini$(TARGET_STUBNAME)_$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIXCNAME)
18CPPFLAGS_FINI = -DUCLN_FINI=$(UCLN_FINI)
19LDFLAGS_FINI = -zfiniarray=$(UCLN_FINI)
20
21CPPFLAGSICUUC += $(CPPFLAGS_FINI)
22LDFLAGSICUUC += $(LDFLAGS_FINI)
23CPPFLAGSICUIO += $(CPPFLAGS_FINI)
24LDFLAGSICUIO += $(LDFLAGS_FINI)
25CPPFLAGSICUI18N += $(CPPFLAGS_FINI)
26LDFLAGSICUI18N += $(LDFLAGS_FINI)
27CPPFLAGSCTESTFW += $(CPPFLAGS_FINI)
28LDFLAGSCTESTFW += $(LDFLAGS_FINI)
29
30# ICUUC, ICUIO, ICUI18N, CTESTFW
31endif
32
b75a7d8f 33# -mt means 'compiles and links a multithreaded program'
374ca955
A
34THREADSCFLAGS += -mt
35THREADSCXXFLAGS += -mt
b75a7d8f
A
36
37## Commands to link
38## For Sun Workshop, use CC to link to bring in C++ runtime
39LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
40LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
41
42## Commands to make a shared library
43SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
44SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
45
46## Compiler switch to embed a runtime search path
729e4ab9
A
47LD_RPATH= -R'$$'ORIGIN
48LD_RPATH_PRE= -R
b75a7d8f 49
73c04bcf
A
50#LIBRARY_PATH_PREFIX=/usr/lib/lwp:
51
b75a7d8f 52## Compiler switch to embed a library name
374ca955
A
53LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
54
b75a7d8f
A
55## Shared object suffix
56SO= so
57## Non-shared intermediate object suffix
58STATIC_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
b75a7d8f
A
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)
374ca955 84 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 85%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 86 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
87
88#
374ca955 89ifeq (strip $(GENCCODE_ASSEMBLY),)
b75a7d8f 90BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
b75a7d8f 91BIR_DEPS= $(NAME).map
374ca955
A
92endif
93
729e4ab9
A
94## Remove shared library 's'
95STATIC_PREFIX_WHEN_USED =
96STATIC_PREFIX =
97
b75a7d8f 98## End Solaris-specific setup