]>
Commit | Line | Data |
---|---|---|
1 | ## -*-makefile-*- | |
2 | ## Linux-specific setup | |
3 | ## Copyright (c) 1999-2009, International Business Machines Corporation and | |
4 | ## others. All Rights Reserved. | |
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 | ||
15 | ## Additional flags when building libraries and with threads | |
16 | THREADSCPPFLAGS = -D_REENTRANT | |
17 | LIBCPPFLAGS = | |
18 | ||
19 | # The tests need complete IEEE floating point support | |
20 | CFLAGS += -mieee | |
21 | CXXFLAGS += -mieee | |
22 | ||
23 | ## Compiler switch to embed a runtime search path | |
24 | LD_RPATH= | |
25 | LD_RPATH_PRE= -Wl,-rpath, | |
26 | ||
27 | ## Compiler switch to embed a library name | |
28 | LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) | |
29 | ||
30 | ||
31 | ## Shared library options | |
32 | LD_SOOPTIONS= -Wl,-Bsymbolic | |
33 | ||
34 | ## Shared object suffix | |
35 | SO = so | |
36 | ## Non-shared intermediate object suffix | |
37 | STATIC_O = ao | |
38 | ||
39 | ## Compilation rules | |
40 | %.$(STATIC_O): $(srcdir)/%.c | |
41 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< | |
42 | %.o: $(srcdir)/%.c | |
43 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< | |
44 | ||
45 | %.$(STATIC_O): $(srcdir)/%.cpp | |
46 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< | |
47 | %.o: $(srcdir)/%.cpp | |
48 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< | |
49 | ||
50 | ||
51 | ## Dependency rules | |
52 | %.d: $(srcdir)/%.c | |
53 | @echo "generating dependency information for $<" | |
54 | @$(SHELL) -ec '$(GEN_DEPS.c) $< \ | |
55 | | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ | |
56 | [ -s $@ ] || rm -f $@' | |
57 | ||
58 | %.d: $(srcdir)/%.cpp | |
59 | @echo "generating dependency information for $<" | |
60 | @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ | |
61 | | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ | |
62 | [ -s $@ ] || rm -f $@' | |
63 | ||
64 | ## Versioned libraries rules | |
65 | ||
66 | %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) | |
67 | $(RM) $@ && ln -s ${<F} $@ | |
68 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) | |
69 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ | |
70 | ||
71 | # The type of assembly to write for generating an object file | |
72 | GENCCODE_ASSEMBLY=-a gcc | |
73 | ||
74 | ## Bind internal references | |
75 | ||
76 | # LDflags that pkgdata will use | |
77 | BIR_LDFLAGS= -Wl,-Bsymbolic | |
78 | ||
79 | # Dependencies [i.e. map files] for the final library | |
80 | BIR_DEPS= | |
81 | ||
82 | ## End Linux-specific setup | |
83 |