400b198fe29ed4508905f4b073cdaba0ee1d1bcd
[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 -I$(top_builddir)/src/util \
31 $(GALLIUM_PIPE_LOADER_DEFINES) \
32 $(LIBDRM_CFLAGS) \
33 $(VISIBILITY_CFLAGS) \
34 -DGALLIUM_RBUG \
35 -DGALLIUM_TRACE
36
37 pipedir = $(libdir)/gallium-pipe
38 pipe_LTLIBRARIES =
39
40 PIPE_LIBS =
41
42 if NEED_GALLIUM_VL
43 PIPE_LIBS += \
44 $(top_builddir)/src/gallium/auxiliary/libgalliumvl.la
45 else
46 PIPE_LIBS += \
47 $(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la
48 endif
49
50 if NEED_GALLIUM_VL_WINSYS
51 PIPE_LIBS+= \
52 $(top_builddir)/src/gallium/auxiliary/libgalliumvlwinsys.la
53 endif
54
55 PIPE_LIBS += \
56 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
57 $(top_builddir)/src/compiler/nir/libnir.la \
58 $(top_builddir)/src/util/libmesautil.la \
59 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
60 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
61 $(GALLIUM_COMMON_LIB_DEPS)
62
63 AM_LDFLAGS = \
64 -module \
65 -no-undefined \
66 -avoid-version \
67 $(GC_SECTIONS) \
68 $(LD_NO_UNDEFINED)
69
70 if HAVE_LD_VERSION_SCRIPT
71 AM_LDFLAGS += \
72 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.sym
73 endif
74
75 if HAVE_GALLIUM_LLVM
76 PIPE_LIBS += $(LLVM_LIBS)
77 AM_LDFLAGS += $(LLVM_LDFLAGS)
78 endif
79
80 if HAVE_GALLIUM_I915
81 pipe_LTLIBRARIES += pipe_i915.la
82
83 pipe_i915_la_SOURCES = pipe_i915.c
84 nodist_EXTRA_pipe_i915_la_SOURCES = dummy.cpp
85 pipe_i915_la_LIBADD = \
86 $(PIPE_LIBS) \
87 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
88 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
89 $(LIBDRM_LIBS) \
90 $(I915_LIBS)
91
92 endif
93
94 if HAVE_GALLIUM_NOUVEAU
95 pipe_LTLIBRARIES += pipe_nouveau.la
96
97 pipe_nouveau_la_SOURCES = pipe_nouveau.c
98 nodist_EXTRA_pipe_nouveau_la_SOURCES = dummy.cpp
99 pipe_nouveau_la_LIBADD = \
100 $(PIPE_LIBS) \
101 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
102 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
103 $(LIBDRM_LIBS) \
104 $(NOUVEAU_LIBS)
105
106 endif
107
108 if HAVE_GALLIUM_R300
109 pipe_LTLIBRARIES += pipe_r300.la
110
111 pipe_r300_la_SOURCES = pipe_r300.c
112 nodist_EXTRA_pipe_r300_la_SOURCES = dummy.cpp
113 pipe_r300_la_LIBADD = \
114 $(PIPE_LIBS) \
115 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
116 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
117 $(LIBDRM_LIBS) \
118 $(RADEON_LIBS)
119
120 endif
121
122 if HAVE_GALLIUM_R600
123 pipe_LTLIBRARIES += pipe_r600.la
124
125 pipe_r600_la_SOURCES = pipe_r600.c
126 nodist_EXTRA_pipe_r600_la_SOURCES = dummy.cpp
127 pipe_r600_la_LIBADD = \
128 $(PIPE_LIBS) \
129 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
130 $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
131 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
132 $(LIBDRM_LIBS) \
133 $(RADEON_LIBS) \
134 $(LIBELF_LIBS)
135 endif
136
137 if HAVE_GALLIUM_RADEONSI
138 pipe_LTLIBRARIES += pipe_radeonsi.la
139
140 pipe_radeonsi_la_SOURCES = pipe_radeonsi.c
141 nodist_EXTRA_pipe_radeonsi_la_SOURCES = dummy.cpp
142 pipe_radeonsi_la_LIBADD = \
143 $(PIPE_LIBS) \
144 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
145 $(top_builddir)/src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.la \
146 $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
147 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
148 $(top_builddir)/src/amd/common/libamd_common.la \
149 $(LIBDRM_LIBS) \
150 $(RADEON_LIBS) \
151 $(AMDGPU_LIBS)
152
153 endif
154
155 if HAVE_GALLIUM_FREEDRENO
156 pipe_LTLIBRARIES += pipe_msm.la
157
158 pipe_msm_la_SOURCES = pipe_msm.c
159 nodist_EXTRA_pipe_msm_la_SOURCES = dummy.cpp
160 pipe_msm_la_LIBADD = \
161 $(PIPE_LIBS) \
162 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
163 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
164 $(LIBDRM_LIBS) \
165 $(FREEDRENO_LIBS)
166
167 endif
168
169 if HAVE_GALLIUM_SVGA
170 pipe_LTLIBRARIES += pipe_vmwgfx.la
171
172 pipe_vmwgfx_la_SOURCES = pipe_vmwgfx.c
173 nodist_EXTRA_pipe_vmwgfx_la_SOURCES = dummy.cpp
174
175 pipe_vmwgfx_la_LIBADD = \
176 $(PIPE_LIBS) \
177 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
178 $(top_builddir)/src/gallium/drivers/svga/libsvga.la \
179 $(LIBDRM_LIBS)
180
181 endif
182
183 if HAVE_GALLIUM_SWRAST
184 pipe_LTLIBRARIES += pipe_swrast.la
185 pipe_swrast_la_SOURCES = pipe_swrast.c
186 nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
187 pipe_swrast_la_LIBADD = $(PIPE_LIBS)
188
189 if HAVE_GALLIUM_SOFTPIPE
190 AM_CPPFLAGS += -DGALLIUM_SOFTPIPE
191
192 pipe_swrast_la_LIBADD += \
193 $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
194 endif
195
196 if HAVE_GALLIUM_LLVMPIPE
197 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
198
199 pipe_swrast_la_LIBADD += \
200 $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
201 endif
202
203 if HAVE_GALLIUM_SWR
204 AM_CPPFLAGS += -DGALLIUM_SWR
205
206 pipe_swrast_la_LIBADD += \
207 $(top_builddir)/src/gallium/drivers/swr/libmesaswr.la
208 endif
209
210 pipe_swrast_la_LIBADD += \
211 $(GALLIUM_PIPE_LOADER_WINSYS_LIBS)
212
213 endif
214
215 EXTRA_DIST = pipe.sym