86f7c2fd52
ok kettenis@ patrick@
97 lines
2.8 KiB
Makefile
97 lines
2.8 KiB
Makefile
# $OpenBSD: Makefile.bsd-wrapper,v 1.28 2019/08/28 08:01:48 jsg Exp $
|
|
|
|
.include <bsd.own.mk>
|
|
.include <bsd.xconf.mk>
|
|
|
|
SHARED_LIBS= EGL 1.1 gbm 0.4 glapi 0.2 GL 17.1 GLESv1_CM 2.0 GLESv2 2.0 \
|
|
OSMesa 11.0
|
|
|
|
DRI_DRIVERS= swrast
|
|
GALLIUM_DRIVERS= swrast
|
|
VULKAN_DRIVERS= no
|
|
WITH_LLVM= --disable-llvm
|
|
|
|
.if ${MACHINE} == i386 || ${MACHINE} == amd64
|
|
DRI_DRIVERS=swrast,radeon,r200,i915,i965
|
|
GALLIUM_DRIVERS=swrast,r300,r600,radeonsi
|
|
VULKAN_DRIVERS= intel,radeon
|
|
WITH_LLVM= --enable-llvm
|
|
.endif
|
|
|
|
.if ${MACHINE} == loongson || ${MACHINE} == macppc || \
|
|
${MACHINE} == sparc64
|
|
DRI_DRIVERS=swrast,radeon,r200
|
|
GALLIUM_DRIVERS=swrast,r300,r600
|
|
.endif
|
|
|
|
.if ${MACHINE} == arm64
|
|
DRI_DRIVERS=swrast,radeon,r200
|
|
GALLIUM_DRIVERS=swrast,r300,r600,radeonsi
|
|
VULKAN_DRIVERS= radeon
|
|
WITH_LLVM= --enable-llvm
|
|
.endif
|
|
|
|
CONFIGURE_ARGS= --with-dri-drivers=${DRI_DRIVERS} \
|
|
--with-gallium-drivers=${GALLIUM_DRIVERS} \
|
|
--with-vulkan-drivers=${VULKAN_DRIVERS} \
|
|
--disable-silent-rules \
|
|
${WITH_LLVM} \
|
|
--disable-glx-tls \
|
|
--disable-regen-sources \
|
|
--enable-gles1 --enable-gles2 \
|
|
--enable-shared-glapi \
|
|
--enable-osmesa \
|
|
--enable-gbm \
|
|
--enable-texture-float \
|
|
--enable-autotools \
|
|
--with-platforms="x11,drm" \
|
|
--prefix=${X11BASE} \
|
|
--with-dri-driverdir=${X11BASE}/lib/modules/dri \
|
|
--with-dri-searchpath=${X11BASE}/lib/modules/dri
|
|
|
|
.if ${XENOCARA_BUILD_DRI3:L} == "yes"
|
|
CONFIGURE_ARGS+= --enable-dri3
|
|
.endif
|
|
|
|
# The i965 driver uses the cmpxchg8b instruction
|
|
.if ${MACHINE} == i386
|
|
CONFIGURE_ARGS+= USER_CFLAGS="-march=i586" USER_CXXFLAGS="-march=i586"
|
|
.endif
|
|
|
|
.if ${MACHINE} == alpha
|
|
# -O2 causes gcc ICE on main/format_pack.c and program/prog_execute.c
|
|
O1= -fdefer-pop -fguess-branch-probability -fcprop-registers \
|
|
-fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce \
|
|
-ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra \
|
|
-ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time \
|
|
-fmerge-constants -fomit-frame-pointer
|
|
|
|
O2= ${O1} -fthread-jumps -fcrossjumping -foptimize-sibling-calls \
|
|
-fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm \
|
|
-fexpensive-optimizations -frerun-cse-after-loop \
|
|
-fcaller-saves -fpeephole2 -fschedule-insns -fschedule-insns2 \
|
|
-fsched-interblock -fsched-spec -fregmove \
|
|
-fdelete-null-pointer-checks -freorder-blocks \
|
|
-freorder-functions -falign-functions -falign-jumps -falign-loops \
|
|
-falign-labels -ftree-pre
|
|
|
|
CONFIGURE_ARGS+= USER_CFLAGS="-O0 ${O2}"
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == sh
|
|
CONFIGURE_ARGS+= USER_CFLAGS="-O0"
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == hppa
|
|
CONFIGURE_ARGS+= USER_CFLAGS="-O0"
|
|
.endif
|
|
|
|
${.OBJDIR}/src/util/format_srgb.c:
|
|
lndir -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}
|
|
|
|
.include <bsd.xorg.mk>
|
|
|
|
# XXX needs to come after bsd.xorg.mk, because .if !target(config.status)
|
|
# won't trigger otherwise.
|
|
config.status: ${.OBJDIR}/src/util/format_srgb.c
|