2 ## Copyright (C) 2016 and later: Unicode, Inc. and others.
3 ## License & terms of use: http://www.unicode.org/copyright.html
4 ## Solaris-specific setup using gcc
5 ## Copyright (c) 1999-2014, International Business Machines Corporation and
6 ## others. All Rights Reserved.
8 ## Flags for position independent code
9 SHAREDLIBCFLAGS = -fPIC
10 SHAREDLIBCXXFLAGS = -fPIC
11 SHAREDLIBCPPFLAGS = -DPIC
13 ## Commands to generate dependency files
14 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) $(CFLAGS)
15 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
17 ## These are the library specific LDFLAGS
18 LDFLAGSICUDT=-nodefaultlibs -nostdlib
20 ## Additional flags when building libraries and with threads
21 THREADSCPPFLAGS = -D_REENTRANT
23 ## Compiler switch to embed a runtime search path
24 LD_RPATH= -R'$$'ORIGIN
27 ## Compiler switch to embed a library name
28 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
30 ## Shared library options
31 LD_SOOPTIONS= -Wl,-Bsymbolic
33 ## The type of assembly needed when pkgdata is used for generating shared libraries.
34 ## Only use this when not on x86 Solaris.
35 ifeq (strip $(GENCCODE_ASSEMBLY),)
36 GENCCODE_ASSEMBLY=-a sun
39 ## Shared object suffix
41 ## Non-shared intermediate object suffix
45 %.$(STATIC_O): $(srcdir)/%.c
46 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
48 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
50 %.$(STATIC_O): $(srcdir)/%.cpp
51 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
53 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
58 @echo "generating dependency information for $<"
59 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
60 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
61 [ -s $@ ] || rm -f $@'
64 @echo "generating dependency information for $<"
65 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
66 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
67 [ -s $@ ] || rm -f $@'
69 ## Versioned libraries rules
71 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
72 $(RM) $@ && ln -s ${<F} $@
73 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
74 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
76 ## Remove shared library 's'
77 STATIC_PREFIX_WHEN_USED =
80 ## End Solaris-specific setup