74
65
ifeq ($(DEB_HOST_ARCH_OS), linux)
75
66
# Gallium drivers require libdrm-{nouveau,radeon}, only available on Linux
76
67
GALLIUM_DRIVERS += nouveau r600 r300 svga
77
69
# Although the KMS egl drivers will probably build on kfreebsd & hurd
78
70
# only linux actually has KMS drivers implemented at this point.
79
71
EGL_DISPLAYS += drm
85
77
ifneq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 i386))
86
78
DRI_DRIVERS += i915 i965
79
# Radeonsi needs LLVM, so only build it on the subset of archs
80
# where we have LLVM enabled.
81
GALLIUM_DRIVERS += radeonsi
91
# Build the llvmpipe driver only on amd64, i386 until it's tested elsewhere
92
ifeq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 i386))
86
# Build the llvmpipe driver only on amd64, i386 and armhf until it's tested
88
ifeq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 i386 arm))
93
89
DRI_DRIVERS += swrast
95
91
GALLIUM_DRIVERS += swrast
98
94
# LLVM is required for r300g and recommended for swrastg on x86:
99
95
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-i386))
100
96
confflags_GALLIUM += --enable-gallium-llvm
97
confflags_GALLIUM += --with-llvm-shared-libs
103
100
confflags_DIRECT_RENDERING = --enable-driglx-direct
110
107
confflags-dri = \
112
109
--with-dri-drivers="$(DRI_DRIVERS)" \
113
110
--with-dri-driverdir=/usr/lib/$(DEB_HOST_MULTIARCH)/dri \
111
--with-dri-searchpath='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri' \
114
113
--enable-glx-tls \
115
114
--enable-shared-dricore \
116
115
--enable-shared-glapi \
123
122
$(confflags_OPENVG) \
124
123
$(confflags-common)
128
--with-gallium-drivers= \
129
--with-driver=osmesa \
132
confflags-osmesa-static = \
134
--with-gallium-drivers= \
135
--with-driver=osmesa \
139
confflags-osmesa16 = \
141
--with-gallium-drivers= \
142
--with-driver=osmesa \
143
--with-osmesa-bits=16 \
146
confflags-osmesa16-static = \
148
--with-gallium-drivers= \
149
--with-driver=osmesa \
150
--with-osmesa-bits=16 \
154
confflags-osmesa32 = \
156
--with-gallium-drivers= \
157
--with-driver=osmesa \
158
--with-osmesa-bits=32 \
161
confflags-osmesa32-static = \
163
--with-gallium-drivers= \
164
--with-driver=osmesa \
165
--with-osmesa-bits=32 \
169
confflags-swx11+glu = \
171
--with-gallium-drivers= \
175
CXXFLAGS="$(CXXFLAGS)"
177
confflags-swx11+glu-static = \
179
--with-gallium-drivers= \
184
CXXFLAGS="$(CXXFLAGS)"
186
confflags-swx11+glu-i386-i686 = \
188
--with-gallium-drivers= \
191
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/i686/cmov \
192
CFLAGS="$(CFLAGS) -march=i686" \
193
CXXFLAGS="$(CXXFLAGS) -march=i686"
195
autotools_files = bin/config.guess bin/config.sub
197
125
configure: $(QUILT_STAMPFN) configure.ac
198
for file in $(autotools_files); do cp $$file $$file.pristine; done
201
128
# list the configurations that will built
264
191
rm -f conftest* */conftest*
265
192
rm -rf autom4te.cache */autom4te.cache
267
rm -rf configure config.guess config.sub config.h.in
194
rm -rf configure bin/config.guess bin/config.sub config.h.in
268
195
rm -rf $$(find -name Makefile.in)
269
rm -rf aclocal.m4 missing depcomp install-sh ltmain.sh
196
rm -rf aclocal.m4 bin/missing bin/depcomp install-sh bin/ltmain.sh
197
rm -f bin/ar-lib bin/compile bin/ylwrap bin/install-sh
270
198
rm -rf $(STAMP_DIR)
271
199
for file in debian/*.in; do rm -f $${file%%.in}; done
272
# Those are auto-updated, grr:
273
for file in $(autotools_files); do if [ -f $$file.pristine ]; then mv -f $$file.pristine $$file; fi; done
274
ln -sf minstall bin/install-sh
200
rm -f src/glsl/builtins/tools/texture_builtins.pyc
201
rm -f src/mapi/glapi/gen/*.pyc
202
rm -f src/mesa/main/*.pyc
276
204
# And for pkgstriptranslation's benefit…
277
205
rm -f src/mesa/drivers/dri/common/xmlpool/xmlpool.pot
296
224
dh_installdocs -s
297
225
dh_installexamples -s
299
# Classic DRI and Gallium DRI are mixed up together here
300
# Remove the whole tree to avoid false-positives in --list-missing, and
301
# install the right files manually.
302
rm -r debian/tmp/dri/usr/lib/$(DEB_HOST_MULTIARCH)/dri
304
227
# Also get rid of other files which aren't installed. Do not
305
228
# use -f to ensure we notice disappearing files:
306
229
set -e; for file in $(NOT_INSTALLED); do rm debian/tmp/$$file; done
307
230
# Files only in git, not in tarballs, OK to use rm -f here:
308
231
set -e; for file in $(NOT_INSTALLED_EITHER); do rm -f debian/tmp/$$file; done
309
# No need for this .so, libglapi is just a convenience library:
232
# No need for these .so, they're just convenience libraries:
310
233
rm debian/tmp/dri/usr/lib/${DEB_HOST_MULTIARCH}/libglapi.so
234
rm debian/tmp/dri/usr/lib/${DEB_HOST_MULTIARCH}/libdricore*.so
235
# rm debian/tmp/dri/usr/lib/${DEB_HOST_MULTIARCH}/libgallium*.so
237
find debian/tmp/ -name '*.la' -exec rm '{}' ';'
312
239
dh_install -s --fail-missing
314
# If the llvmpipe driver was built, copy it to the package dir
315
ifneq (,$(filter swrast,$(GALLIUM_DRIVERS)))
316
dh_install -plibgl1-mesa-dri build/dri/$(DEB_HOST_MULTIARCH)/gallium/swrast_dri.so \
317
usr/lib/${DEB_HOST_MULTIARCH}/dri
320
241
# Create an ld.so.conf which says where to find libGL from Mesa
321
242
echo "/usr/lib/$(DEB_HOST_MULTIARCH)/mesa" \
322
243
> $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/$(DEB_HOST_MULTIARCH)/mesa/ld.so.conf
323
echo "/usr/lib/$(DEB_HOST_MULTIARCH)/mesa" \
324
> $(CURDIR)/debian/libgl1-mesa-swx11/usr/lib/$(DEB_HOST_MULTIARCH)/mesa/ld.so.conf
326
245
# Empty directory for the alternative
327
246
mkdir -p $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/$(DEB_HOST_MULTIARCH)/xorg/x11-extra-modules
328
mkdir -p $(CURDIR)/debian/libgl1-mesa-swx11/usr/lib/$(DEB_HOST_MULTIARCH)/xorg/x11-extra-modules
330
248
# Create an ld.so.conf which says where to find libEGL, libGLES{1,2}
331
249
# and libOpenVG from Mesa.
369
287
/usr/lib/$(DEB_HOST_MULTIARCH)/mesa-egl
372
dh_builddeb $(foreach pkg,$(dbgpkg),-p$(pkg)) -- -Zxz
373
dh_builddeb $(foreach pkg,$(otherpkg),-p$(pkg)) -- -Zlzma
290
dh_builddeb -s -- -Zxz
375
292
binary: binary-indep binary-arch
376
293
.PHONY: configs build clean binary-indep binary-arch binary install