automake: ask the linker to do garbage collection
[mesa.git] / src / gallium / Automake.inc
1 GALLIUM_CFLAGS = \
2 -I$(top_srcdir)/include \
3 -I$(top_srcdir)/src/gallium/include \
4 -I$(top_srcdir)/src/gallium/auxiliary \
5 $(DEFINES)
6
7 # src/gallium/auxiliary must appear before src/gallium/drivers
8 # because there are stupidly two rbug_context.h files in
9 # different directories, and which one is included by the
10 # preprocessor is determined by the ordering of the -I flags.
11 GALLIUM_DRIVER_CFLAGS = \
12 -I$(srcdir)/include \
13 -I$(top_srcdir)/include \
14 -I$(top_srcdir)/src/gallium/include \
15 -I$(top_srcdir)/src/gallium/auxiliary \
16 -I$(top_srcdir)/src/gallium/drivers \
17 $(DEFINES) \
18 $(VISIBILITY_CFLAGS)
19
20 GALLIUM_DRIVER_CXXFLAGS = \
21 -I$(srcdir)/include \
22 -I$(top_srcdir)/include \
23 -I$(top_srcdir)/src/gallium/include \
24 -I$(top_srcdir)/src/gallium/auxiliary \
25 -I$(top_srcdir)/src/gallium/drivers \
26 $(DEFINES) \
27 $(VISIBILITY_CXXFLAGS)
28
29 GALLIUM_DRI_CFLAGS = \
30 -I$(top_srcdir)/include \
31 -I$(top_srcdir)/src/gallium/include \
32 -I$(top_srcdir)/src/gallium/auxiliary \
33 -I$(top_srcdir)/src/gallium/drivers \
34 -I$(top_srcdir)/src/gallium/winsys \
35 -I$(top_srcdir)/src/mesa \
36 -I$(top_srcdir)/src/mapi \
37 $(DEFINES) \
38 $(PTHREAD_CFLAGS) \
39 $(LIBDRM_CFLAGS) \
40 $(VISIBILITY_CFLAGS)
41
42 GALLIUM_VIDEO_CFLAGS = \
43 -I$(top_srcdir)/include \
44 -I$(top_srcdir)/src/gallium/include \
45 -I$(top_srcdir)/src/gallium/auxiliary \
46 -I$(top_srcdir)/src/gallium/drivers \
47 -I$(top_srcdir)/src/gallium/winsys \
48 $(DEFINES) \
49 $(PTHREAD_CFLAGS) \
50 $(LIBDRM_CFLAGS) \
51 $(VISIBILITY_CFLAGS)
52
53
54 DRI_VERSION_SCRIPT ?= $(top_srcdir)/src/gallium/state_trackers/dri/dri.link
55
56 GALLIUM_DRI_LINKER_FLAGS = \
57 -shared \
58 -module \
59 -avoid-version \
60 $(GC_SECTIONS) \
61 -Wl,--version-script=$(DRI_VERSION_SCRIPT)
62
63 GALLIUM_VDPAU_LINKER_FLAGS = \
64 -shared \
65 -module \
66 -no-undefined \
67 -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
68 -export-symbols-regex $(VDPAU_EXPORTS) \
69 $(GC_SECTIONS) \
70 -Wl,--no-undefined
71
72 GALLIUM_XVMC_LINKER_FLAGS = \
73 -shared \
74 -module \
75 -no-undefined \
76 -version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
77 -export-symbols-regex '^XvMC' \
78 $(GC_SECTIONS) \
79 -Wl,--no-undefined
80
81 GALLIUM_OMX_LINKER_FLAGS = \
82 -shared \
83 -module \
84 -no-undefined \
85 -export-symbols-regex $(EXPORTS) \
86 $(GC_SECTIONS) \
87 -Wl,--no-undefined
88
89 GALLIUM_VDPAU_LIB_DEPS = \
90 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
91 $(top_builddir)/src/gallium/state_trackers/vdpau/libvdpautracker.la \
92 $(VDPAU_LIBS) \
93 $(LIBDRM_LIBS) \
94 -lm \
95 $(CLOCK_LIB) \
96 $(PTHREAD_LIBS) \
97 $(DLOPEN_LIBS)
98
99 GALLIUM_XVMC_LIB_DEPS = \
100 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
101 $(top_builddir)/src/gallium/state_trackers/xvmc/libxvmctracker.la \
102 $(XVMC_LIBS) \
103 $(LIBDRM_LIBS)
104
105 GALLIUM_OMX_LIB_DEPS = \
106 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
107 $(top_builddir)/src/gallium/state_trackers/omx/libomxtracker.la \
108 $(GALLIUM_DRI_LIB_DEPS) \
109 $(OMX_LIBS)
110
111 GALLIUM_WINSYS_CFLAGS = \
112 -I$(top_srcdir)/include \
113 -I$(top_srcdir)/src/gallium/include \
114 -I$(top_srcdir)/src/gallium/auxiliary \
115 $(DEFINES) \
116 $(VISIBILITY_CFLAGS)
117
118 if HAVE_MESA_LLVM
119
120 GALLIUM_DRI_LINKER_FLAGS += $(LLVM_LDFLAGS)
121 GALLIUM_VDPAU_LINKER_FLAGS += $(LLVM_LDFLAGS)
122 GALLIUM_XVMC_LINKER_FLAGS += $(LLVM_LDFLAGS)
123 GALLIUM_OMX_LINKER_FLAGS += $(LLVM_LDFLAGS)
124
125 GALLIUM_DRI_LIB_DEPS += $(LLVM_LIBS)
126 GALLIUM_VDPAU_LIB_DEPS += $(LLVM_LIBS)
127 GALLIUM_XVMC_LIB_DEPS += $(LLVM_LIBS)
128 GALLIUM_OMX_LIB_DEPS += $(LLVM_LIBS)
129
130 endif