]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-solaris-gcc
ICU-461.12.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris-gcc
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Solaris-specific setup using gcc
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 = -fPIC
8SHAREDLIBCXXFLAGS = -fPIC
9SHAREDLIBCPPFLAGS = -DPIC
10
11## Commands to generate dependency files
12GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
13GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
14
73c04bcf
A
15## These are the library specific LDFLAGS
16LDFLAGSICUDT=-nodefaultlibs -nostdlib
17
18## Additional flags when building libraries and with threads
19THREADSCPPFLAGS = -D_REENTRANT
20
b75a7d8f 21## Compiler switch to embed a runtime search path
729e4ab9
A
22LD_RPATH= -R'$$'ORIGIN
23LD_RPATH_PRE= -R
b75a7d8f
A
24
25## Compiler switch to embed a library name
374ca955
A
26LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
27
729e4ab9
A
28## Shared library options
29LD_SOOPTIONS= -Wl,-Bsymbolic
30
374ca955 31## The type of assembly needed when pkgdata is used for generating shared libraries.
73c04bcf
A
32## Only use this when not on x86 Solaris.
33ifeq (strip $(GENCCODE_ASSEMBLY),)
374ca955 34GENCCODE_ASSEMBLY=-a sun
73c04bcf 35endif
b75a7d8f
A
36
37## Shared object suffix
38SO= so
39## Non-shared intermediate object suffix
40STATIC_O = ao
41
42## Compilation rules
43%.$(STATIC_O): $(srcdir)/%.c
44 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
45%.o: $(srcdir)/%.c
46 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
47
48%.$(STATIC_O): $(srcdir)/%.cpp
49 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
50%.o: $(srcdir)/%.cpp
51 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
52
b75a7d8f
A
53
54## Dependency rules
55%.d : $(srcdir)/%.c
56 @echo "generating dependency information for $<"
57 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
58 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
59 [ -s $@ ] || rm -f $@'
60
61%.d : $(srcdir)/%.cpp
62 @echo "generating dependency information for $<"
63 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
64 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
65 [ -s $@ ] || rm -f $@'
66
67## Versioned libraries rules
68
69%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
374ca955 70 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 71%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 72 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f 73
729e4ab9
A
74## Remove shared library 's'
75STATIC_PREFIX_WHEN_USED =
76STATIC_PREFIX =
77
b75a7d8f 78## End Solaris-specific setup