gallium/r600: fix r600 build when OpenCL is enabled
[mesa.git] / src / gallium / targets / pipe-loader / Makefile.am
1 # Copyright © 2012 Intel Corporation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 # DEALINGS IN THE SOFTWARE.
22
23 include $(top_srcdir)/src/gallium/Automake.inc
24
25 AM_CPPFLAGS = \
26 $(GALLIUM_CFLAGS) \
27 -I$(top_srcdir)/include \
28 -I$(top_srcdir)/src/gallium/drivers \
29 -I$(top_srcdir)/src/gallium/winsys \
30 $(GALLIUM_PIPE_LOADER_DEFINES) \
31 $(LIBDRM_CFLAGS) \
32 $(VISIBILITY_CFLAGS) \
33 -DGALLIUM_RBUG \
34 -DGALLIUM_TRACE
35
36 pipedir = $(libdir)/gallium-pipe
37 pipe_LTLIBRARIES =
38
39 PIPE_LIBS =
40
41 if NEED_GALLIUM_VL
42 PIPE_LIBS += \
43 $(top_builddir)/src/gallium/auxiliary/libgalliumvl.la
44 else
45 PIPE_LIBS += \
46 $(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la
47 endif
48
49 if NEED_GALLIUM_VL_WINSYS
50 PIPE_LIBS+= \
51 $(top_builddir)/src/gallium/auxiliary/libgalliumvlwinsys.la
52 endif
53
54 PIPE_LIBS += \
55 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
56 $(top_builddir)/src/compiler/nir/libnir.la \
57 $(top_builddir)/src/util/libmesautil.la \
58 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
59 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
60 $(GALLIUM_COMMON_LIB_DEPS)
61
62 AM_LDFLAGS = \
63 -module \
64 -no-undefined \
65 -avoid-version \
66 $(GC_SECTIONS) \
67 $(LD_NO_UNDEFINED)
68
69 if HAVE_LD_VERSION_SCRIPT
70 AM_LDFLAGS += \
71 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.sym
72 endif
73
74 if HAVE_GALLIUM_LLVM
75 PIPE_LIBS += $(LLVM_LIBS)
76 AM_LDFLAGS += $(LLVM_LDFLAGS)
77 endif
78
79 if HAVE_GALLIUM_I915
80 pipe_LTLIBRARIES += pipe_i915.la
81
82 pipe_i915_la_SOURCES = pipe_i915.c
83 nodist_EXTRA_pipe_i915_la_SOURCES = dummy.cpp
84 pipe_i915_la_LIBADD = \
85 $(PIPE_LIBS) \
86 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
87 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
88 $(LIBDRM_LIBS) \
89 $(INTEL_LIBS)
90
91 endif
92
93 if HAVE_GALLIUM_NOUVEAU
94 pipe_LTLIBRARIES += pipe_nouveau.la
95
96 pipe_nouveau_la_SOURCES = pipe_nouveau.c
97 nodist_EXTRA_pipe_nouveau_la_SOURCES = dummy.cpp
98 pipe_nouveau_la_LIBADD = \
99 $(PIPE_LIBS) \
100 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
101 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
102 $(LIBDRM_LIBS) \
103 $(NOUVEAU_LIBS)
104
105 endif
106
107 if HAVE_GALLIUM_R300
108 pipe_LTLIBRARIES += pipe_r300.la
109
110 pipe_r300_la_SOURCES = pipe_r300.c
111 nodist_EXTRA_pipe_r300_la_SOURCES = dummy.cpp
112 pipe_r300_la_LIBADD = \
113 $(PIPE_LIBS) \
114 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
115 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
116 $(LIBDRM_LIBS) \
117 $(RADEON_LIBS)
118
119 endif
120
121 if HAVE_GALLIUM_R600
122 pipe_LTLIBRARIES += pipe_r600.la
123
124 pipe_r600_la_SOURCES = pipe_r600.c
125 nodist_EXTRA_pipe_r600_la_SOURCES = dummy.cpp
126 pipe_r600_la_LIBADD = \
127 $(PIPE_LIBS) \
128 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
129 $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
130 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
131 $(LIBDRM_LIBS) \
132 $(RADEON_LIBS)
133
134 if NEED_RADEON_LLVM
135 pipe_r600_la_LIBADD += \
136 $(top_builddir)/src/amd/common/libamd_common.la
137 endif
138
139 endif
140
141 if HAVE_GALLIUM_RADEONSI
142 pipe_LTLIBRARIES += pipe_radeonsi.la
143
144 pipe_radeonsi_la_SOURCES = pipe_radeonsi.c
145 nodist_EXTRA_pipe_radeonsi_la_SOURCES = dummy.cpp
146 pipe_radeonsi_la_LIBADD = \
147 $(PIPE_LIBS) \
148 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
149 $(top_builddir)/src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.la \
150 $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
151 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
152 $(top_builddir)/src/amd/common/libamd_common.la \
153 $(LIBDRM_LIBS) \
154 $(RADEON_LIBS) \
155 $(AMDGPU_LIBS)
156
157 endif
158
159 if HAVE_GALLIUM_FREEDRENO
160 pipe_LTLIBRARIES += pipe_msm.la
161
162 pipe_msm_la_SOURCES = pipe_msm.c
163 nodist_EXTRA_pipe_msm_la_SOURCES = dummy.cpp
164 pipe_msm_la_LIBADD = \
165 $(PIPE_LIBS) \
166 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
167 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
168 $(LIBDRM_LIBS) \
169 $(FREEDRENO_LIBS)
170
171 endif
172
173 if HAVE_GALLIUM_SVGA
174 pipe_LTLIBRARIES += pipe_vmwgfx.la
175
176 pipe_vmwgfx_la_SOURCES = pipe_vmwgfx.c
177 nodist_EXTRA_pipe_vmwgfx_la_SOURCES = dummy.cpp
178
179 pipe_vmwgfx_la_LIBADD = \
180 $(PIPE_LIBS) \
181 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
182 $(top_builddir)/src/gallium/drivers/svga/libsvga.la \
183 $(LIBDRM_LIBS)
184
185 endif
186
187 if HAVE_GALLIUM_SWRAST
188 pipe_LTLIBRARIES += pipe_swrast.la
189 pipe_swrast_la_SOURCES = pipe_swrast.c
190 nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
191 pipe_swrast_la_LIBADD = $(PIPE_LIBS)
192
193 if HAVE_GALLIUM_SOFTPIPE
194 AM_CPPFLAGS += -DGALLIUM_SOFTPIPE
195
196 pipe_swrast_la_LIBADD += \
197 $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
198 endif
199
200 if HAVE_GALLIUM_LLVMPIPE
201 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
202
203 pipe_swrast_la_LIBADD += \
204 $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
205 endif
206
207 if HAVE_GALLIUM_SWR
208 AM_CPPFLAGS += -DGALLIUM_SWR
209
210 pipe_swrast_la_LIBADD += \
211 $(top_builddir)/src/gallium/drivers/swr/libmesaswr.la
212 endif
213
214 pipe_swrast_la_LIBADD += \
215 $(GALLIUM_PIPE_LOADER_WINSYS_LIBS)
216
217 endif
218
219 EXTRA_DIST = pipe.sym