]>
Commit | Line | Data |
---|---|---|
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 | ## Linux-specific setup |
57a6839d | 5 | ## Copyright (c) 1999-2013, International Business Machines Corporation and |
b75a7d8f | 6 | ## others. All Rights Reserved. |
b75a7d8f A |
7 | |
8 | ## Commands to generate dependency files | |
9 | GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) | |
57a6839d | 10 | GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS) |
b75a7d8f A |
11 | |
12 | ## Flags for position independent code | |
13 | SHAREDLIBCFLAGS = -fPIC | |
14 | SHAREDLIBCXXFLAGS = -fPIC | |
15 | SHAREDLIBCPPFLAGS = -DPIC | |
16 | ||
17 | ## Additional flags when building libraries and with threads | |
b75a7d8f | 18 | THREADSCPPFLAGS = -D_REENTRANT |
73c04bcf | 19 | LIBCPPFLAGS = |
b75a7d8f A |
20 | |
21 | ## Compiler switch to embed a runtime search path | |
729e4ab9 | 22 | LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN |
b75a7d8f A |
23 | LD_RPATH_PRE = -Wl,-rpath, |
24 | ||
73c04bcf A |
25 | ## These are the library specific LDFLAGS |
26 | LDFLAGSICUDT=-nodefaultlibs -nostdlib | |
27 | ||
b75a7d8f | 28 | ## Compiler switch to embed a library name |
374ca955 A |
29 | # The initial tab in the next line is to prevent icu-config from reading it. |
30 | LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) | |
31 | #SH# # We can't depend on MIDDLE_SO_TARGET being set. | |
32 | #SH# LD_SONAME= | |
b75a7d8f | 33 | |
729e4ab9 A |
34 | ## Shared library options |
35 | LD_SOOPTIONS= -Wl,-Bsymbolic | |
36 | ||
b75a7d8f A |
37 | ## Shared object suffix |
38 | SO = so | |
39 | ## Non-shared intermediate object suffix | |
40 | STATIC_O = ao | |
41 | ||
42 | ## Compilation rules | |
43 | %.$(STATIC_O): $(srcdir)/%.c | |
51004dcb | 44 | $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -o $@ $<) |
b75a7d8f | 45 | %.o: $(srcdir)/%.c |
51004dcb | 46 | $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS)) -o $@ $<) |
b75a7d8f A |
47 | |
48 | %.$(STATIC_O): $(srcdir)/%.cpp | |
51004dcb | 49 | $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -o $@ $<) |
b75a7d8f | 50 | %.o: $(srcdir)/%.cpp |
51004dcb | 51 | $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS)) -o $@ $<) |
b75a7d8f | 52 | |
b75a7d8f A |
53 | |
54 | ## Dependency rules | |
55 | %.d: $(srcdir)/%.c | |
51004dcb | 56 | $(call ICU_MSG,(deps)) $< |
b75a7d8f A |
57 | @$(SHELL) -ec '$(GEN_DEPS.c) $< \ |
58 | | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ | |
59 | [ -s $@ ] || rm -f $@' | |
60 | ||
61 | %.d: $(srcdir)/%.cpp | |
51004dcb | 62 | $(call ICU_MSG,(deps)) $< |
b75a7d8f A |
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) | |
70 | $(RM) $@ && ln -s ${<F} $@ | |
71 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) | |
72 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ | |
73 | ||
74 | ## Bind internal references | |
75 | ||
76 | # LDflags that pkgdata will use | |
77 | BIR_LDFLAGS= -Wl,-Bsymbolic | |
78 | ||
b75a7d8f A |
79 | # Dependencies [i.e. map files] for the final library |
80 | BIR_DEPS= | |
81 | ||
729e4ab9 A |
82 | ## Remove shared library 's' |
83 | STATIC_PREFIX_WHEN_USED = | |
84 | STATIC_PREFIX = | |
85 | ||
b75a7d8f A |
86 | ## End Linux-specific setup |
87 |