2 ## Copyright (C) 2016 and later: Unicode, Inc. and others.
3 ## License & terms of use: http://www.unicode.org/copyright.html
4 ## Linux-specific setup
5 ## Copyright (c) 1999-2009, International Business Machines Corporation and
6 ## others. All Rights Reserved.
8 ## Commands to generate dependency files
9 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
12 ## Flags for position independent code
13 SHAREDLIBCFLAGS = -fPIC
14 SHAREDLIBCXXFLAGS = -fPIC
15 SHAREDLIBCPPFLAGS = -DPIC
17 ## Additional flags when building libraries and with threads
18 THREADSCPPFLAGS = -D_REENTRANT
21 # The tests need complete IEEE floating point support
25 ## Compiler switch to embed a runtime search path
27 LD_RPATH_PRE= -Wl,-rpath,
29 ## Compiler switch to embed a library name
30 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
33 ## Shared library options
34 LD_SOOPTIONS= -Wl,-Bsymbolic
36 ## Shared object suffix
38 ## Non-shared intermediate object suffix
42 %.$(STATIC_O): $(srcdir)/%.c
43 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
45 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
47 %.$(STATIC_O): $(srcdir)/%.cpp
48 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
50 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
55 @echo "generating dependency information for $<"
56 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
57 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
58 [ -s $@ ] || rm -f $@'
61 @echo "generating dependency information for $<"
62 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
63 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
64 [ -s $@ ] || rm -f $@'
66 ## Versioned libraries rules
68 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
69 $(RM) $@ && ln -s ${<F} $@
70 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
71 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
73 # The type of assembly to write for generating an object file
74 GENCCODE_ASSEMBLY=-a gcc
76 ## Bind internal references
78 # LDflags that pkgdata will use
79 BIR_LDFLAGS= -Wl,-Bsymbolic
81 # Dependencies [i.e. map files] for the final library
84 ## End Linux-specific setup