]>
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 | ## QNX-specific setup |
73c04bcf | 5 | ## Copyright (c) 1999-2006, International Business Machines Corporation and |
b75a7d8f A |
6 | ## others. All Rights Reserved. |
7 | ## | |
8 | ## Provided By: Chris McKillop <cdm@qnx.com> | |
b75a7d8f A |
9 | |
10 | ||
11 | # | |
12 | # Create shared libs that "work" properly. | |
13 | # | |
14 | ||
15 | ## Commands to generate dependency files | |
16 | GEN_DEPS.c= $(CC) -E -Wp,-MM $(DEFS) $(CPPFLAGS) | |
17 | GEN_DEPS.cc= $(CXX) -E -Wp,-MM $(DEFS) $(CPPFLAGS) | |
18 | ||
19 | ## Flags for position independent code | |
20 | SHAREDLIBCFLAGS = -shared | |
21 | SHAREDLIBCXXFLAGS = -shared | |
22 | # SHAREDLIBCPPFLAGS = -shared | |
23 | ||
24 | # | |
25 | # Always generatate PIC code. | |
26 | # | |
27 | #CPPFLAGS+=-shared | |
28 | ||
29 | ## Additional flags when building libraries and with threads | |
30 | LIBCPPFLAGS = | |
31 | THREADSCPPFLAGS = | |
32 | ||
33 | ## Compiler switch to embed a runtime search path | |
34 | LD_RPATH= | |
35 | LD_RPATH_PRE = -Wl,-rpath, | |
36 | ||
37 | ## Compiler switch to embed a library name | |
374ca955 | 38 | LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) |
b75a7d8f A |
39 | |
40 | ## Shared object suffix | |
41 | SO = so | |
42 | ## Non-shared intermediate object suffix | |
43 | STATIC_O = ao | |
44 | ||
45 | ## Compilation rules | |
46 | %.$(STATIC_O): $(srcdir)/%.c | |
47 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< | |
48 | %.o: $(srcdir)/%.c | |
49 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< | |
50 | ||
51 | %.$(STATIC_O): $(srcdir)/%.cpp | |
52 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< | |
53 | %.o: $(srcdir)/%.cpp | |
54 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< | |
55 | ||
b75a7d8f A |
56 | |
57 | ## Dependency rules | |
58 | %.d: $(srcdir)/%.c | |
59 | @echo "generating dependency information for $<" | |
60 | @$(SHELL) -ec '$(GEN_DEPS.c) $< \ | |
61 | | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ | |
62 | [ -s $@ ] || rm -f $@' | |
63 | ||
64 | %.d: $(srcdir)/%.cpp | |
65 | @echo "generating dependency information for $<" | |
66 | @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ | |
67 | | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ | |
68 | [ -s $@ ] || rm -f $@' | |
69 | ||
70 | ## Versioned libraries rules | |
71 | ## | |
72 | ## QNX wants the SONAME in the shared lib to match the final "real" filename. | |
73 | ## (to ease in packaging with QNX's native package format) | |
74 | ## | |
75 | MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR) | |
76 | FINAL_SO_TARGET = $(MIDDLE_SO_TARGET) | |
77 | ||
78 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) | |
79 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION_MAJOR) $@ | |
80 | #%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) | |
81 | # $(RM) $@ && ln -s ${<F} $@ | |
82 | #%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) | |
83 | # $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ | |
84 | ||
85 | ## Bind internal references | |
86 | ||
87 | # LDflags that pkgdata will use | |
88 | BIR_LDFLAGS= -Wl,-Bsymbolic | |
89 | ||
b75a7d8f A |
90 | # Dependencies [i.e. map files] for the final library |
91 | BIR_DEPS= | |
92 | ||
93 | ## End QNX-specific setup | |
94 |