automake: correctly append the version-script
[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 GALLIUM_DRI_LINKER_FLAGS = \
55 -shared \
56 -shrext .so \
57 -module \
58 -avoid-version \
59 $(GC_SECTIONS)
60
61 GALLIUM_VDPAU_LINKER_FLAGS = \
62 -shared \
63 -module \
64 -no-undefined \
65 -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
66 $(GC_SECTIONS) \
67 $(LD_NO_UNDEFINED)
68
69 GALLIUM_XVMC_LINKER_FLAGS = \
70 -shared \
71 -module \
72 -no-undefined \
73 -version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
74 $(GC_SECTIONS) \
75 $(LD_NO_UNDEFINED)
76
77 GALLIUM_OMX_LINKER_FLAGS = \
78 -shared \
79 -module \
80 -no-undefined \
81 -avoid-version \
82 $(GC_SECTIONS) \
83 $(LD_NO_UNDEFINED)
84
85 if HAVE_LD_VERSION_SCRIPT
86 GALLIUM_DRI_LINKER_FLAGS += \
87 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym
88
89 GALLIUM_VDPAU_LINKER_FLAGS += \
90 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym
91
92 GALLIUM_XVMC_LINKER_FLAGS += \
93 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym
94
95 GALLIUM_OMX_LINKER_FLAGS += \
96 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym
97 endif
98
99
100 GALLIUM_COMMON_LIB_DEPS = \
101 -lm \
102 $(CLOCK_LIB) \
103 $(PTHREAD_LIBS) \
104 $(DLOPEN_LIBS)
105
106 GALLIUM_DRI_LIB_DEPS = \
107 $(top_builddir)/src/mesa/libmesagallium.la \
108 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
109 $(SELINUX_LIBS) \
110 $(LIBDRM_LIBS) \
111 $(EXPAT_LIBS) \
112 $(GALLIUM_COMMON_LIB_DEPS)
113
114 GALLIUM_VDPAU_LIB_DEPS = \
115 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
116 $(top_builddir)/src/gallium/state_trackers/vdpau/libvdpautracker.la \
117 $(VDPAU_LIBS) \
118 $(LIBDRM_LIBS) \
119 $(GALLIUM_COMMON_LIB_DEPS)
120
121 GALLIUM_XVMC_LIB_DEPS = \
122 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
123 $(top_builddir)/src/gallium/state_trackers/xvmc/libxvmctracker.la \
124 $(XVMC_LIBS) \
125 $(LIBDRM_LIBS) \
126 $(GALLIUM_COMMON_LIB_DEPS)
127
128 GALLIUM_OMX_LIB_DEPS = \
129 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
130 $(top_builddir)/src/gallium/state_trackers/omx/libomxtracker.la \
131 $(OMX_LIBS) \
132 $(GALLIUM_COMMON_LIB_DEPS)
133
134 GALLIUM_WINSYS_CFLAGS = \
135 -I$(top_srcdir)/include \
136 -I$(top_srcdir)/src/gallium/include \
137 -I$(top_srcdir)/src/gallium/auxiliary \
138 $(DEFINES) \
139 $(VISIBILITY_CFLAGS)
140
141 if HAVE_MESA_LLVM
142
143 GALLIUM_DRI_LINKER_FLAGS += $(LLVM_LDFLAGS)
144 GALLIUM_VDPAU_LINKER_FLAGS += $(LLVM_LDFLAGS)
145 GALLIUM_XVMC_LINKER_FLAGS += $(LLVM_LDFLAGS)
146 GALLIUM_OMX_LINKER_FLAGS += $(LLVM_LDFLAGS)
147
148 GALLIUM_DRI_LIB_DEPS += $(LLVM_LIBS)
149 GALLIUM_VDPAU_LIB_DEPS += $(LLVM_LIBS)
150 GALLIUM_XVMC_LIB_DEPS += $(LLVM_LIBS)
151 GALLIUM_OMX_LIB_DEPS += $(LLVM_LIBS)
152
153 endif