summaryrefslogtreecommitdiff
path: root/lib/mesa/Makefile.bsd-wrapper
blob: 437227cba286395e4b286a048dbf20f635862ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# $OpenBSD: Makefile.bsd-wrapper,v 1.2 2015/11/26 19:05:49 kettenis Exp $

.include <bsd.own.mk>

SHARED_LIBS=	EGL 1.0 gbm 0.0 glapi 0.1 GL 16.0 GLESv1_CM 1.0 GLESv2 1.0 \
		OSMesa 9.0

DRI_DRIVERS=		swrast
GALLIUM_DRIVERS=

.if ${MACHINE} == i386 || ${MACHINE} == amd64
DRI_DRIVERS=swrast,radeon,r200,i915,i965
GALLIUM_DRIVERS=r300,r600
.endif

.if ${MACHINE} == macppc || ${MACHINE} == sparc64
DRI_DRIVERS=swrast,radeon,r200
GALLIUM_DRIVERS=r300,r600
.endif

CONFIGURE_ARGS=		--with-dri-drivers=${DRI_DRIVERS} \
			--with-gallium-drivers=${GALLIUM_DRIVERS} \
			--disable-silent-rules \
			--disable-gallium-llvm \
			--disable-llvm-shared-libs \
			--enable-gles1 --enable-gles2 \
			--enable-shared-glapi \
			--enable-osmesa \
			--enable-gbm \
			--with-egl-platforms="x11,drm" \
			--prefix=${X11BASE} \
			--with-dri-driverdir=${X11BASE}/lib/modules/dri \
			--with-dri-searchpath=${X11BASE}/lib/modules/dri

# The i965 driver uses the cmpxchg8b instruction
.if ${MACHINE} == i386
CONFIGURE_ARGS+=	USER_CFLAGS="-march=i586" USER_CXXFLAGS="-march=i586"
.endif

depend:
.if !exists(${.OBJDIR}/src/util/format_srgb.c)
	lndir -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}
.endif

.include <bsd.xorg.mk>