]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## -*-makefile-*- |
73c04bcf | 2 | ## BSD-specific setup (FreeBSD, OpenBSD, NetBSD, *BSD) |
57a6839d | 3 | ## Copyright (c) 1999-2013, International Business Machines Corporation and |
b75a7d8f | 4 | ## others. All Rights Reserved. |
b75a7d8f A |
5 | |
6 | ## Commands to generate dependency files | |
7 | GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) | |
8 | GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) | |
9 | ||
10 | ## Flags for position independent code | |
11 | SHAREDLIBCFLAGS = -fPIC | |
12 | SHAREDLIBCXXFLAGS = -fPIC | |
13 | SHAREDLIBCPPFLAGS = -DPIC | |
14 | ||
73c04bcf A |
15 | ## Additional flags when building libraries and with threads |
16 | THREADSCPPFLAGS = -D_REENTRANT | |
17 | LIBCPPFLAGS = | |
18 | ||
b75a7d8f A |
19 | ## Compiler switch to embed a runtime search path |
20 | LD_RPATH= | |
21 | LD_RPATH_PRE= -Wl,-rpath, | |
22 | ||
23 | ## Compiler switch to embed a library name | |
374ca955 | 24 | LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) |
b75a7d8f | 25 | |
729e4ab9 A |
26 | ## Shared library options |
27 | LD_SOOPTIONS= -Wl,-Bsymbolic | |
28 | ||
b75a7d8f A |
29 | ## Shared object suffix |
30 | SO = so | |
31 | ## Non-shared intermediate object suffix | |
32 | STATIC_O = ao | |
33 | ||
34 | ## Compilation rules | |
35 | %.$(STATIC_O): $(srcdir)/%.c | |
36 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< | |
37 | %.o: $(srcdir)/%.c | |
38 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< | |
39 | ||
40 | %.$(STATIC_O): $(srcdir)/%.cpp | |
41 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< | |
42 | %.o: $(srcdir)/%.cpp | |
43 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< | |
44 | ||
b75a7d8f A |
45 | |
46 | ## Dependency rules | |
47 | %.d: $(srcdir)/%.c | |
48 | @echo "generating dependency information for $<" | |
49 | @$(SHELL) -ec '$(GEN_DEPS.c) $< \ | |
50 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ | |
51 | [ -s $@ ] || rm -f $@' | |
52 | ||
53 | %.d: $(srcdir)/%.cpp | |
54 | @echo "generating dependency information for $<" | |
55 | @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ | |
56 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ | |
57 | [ -s $@ ] || rm -f $@' | |
58 | ||
59 | ## Versioned libraries rules | |
60 | ||
61 | %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) | |
374ca955 | 62 | $(RM) $@ && ln -s ${<F} $@ |
b75a7d8f | 63 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) |
374ca955 | 64 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ |
b75a7d8f | 65 | |
57a6839d A |
66 | ## Bind internal references |
67 | ||
68 | # LDflags that pkgdata will use | |
69 | BIR_LDFLAGS= -Wl,-Bsymbolic | |
70 | ||
71 | # Dependencies [i.e. map files] for the final library | |
72 | BIR_DEPS= | |
73 | ||
74 | ## Remove shared library 's' | |
75 | STATIC_PREFIX_WHEN_USED = | |
76 | STATIC_PREFIX = | |
77 | ||
78 | ## End BSD-specific setup | |
79 | ||
b75a7d8f | 80 |