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