head	1.14;
access;
symbols
	netbsd-11-0-RC4:1.14
	netbsd-11-0-RC3:1.14
	netbsd-11-0-RC2:1.14
	netbsd-11-0-RC1:1.14
	perseant-exfatfs-base-20250801:1.14
	netbsd-11:1.14.0.6
	netbsd-11-base:1.14
	netbsd-10-1-RELEASE:1.14
	perseant-exfatfs-base-20240630:1.14
	perseant-exfatfs:1.14.0.4
	perseant-exfatfs-base:1.14
	netbsd-8-3-RELEASE:1.6
	netbsd-9-4-RELEASE:1.9
	netbsd-10-0-RELEASE:1.14
	netbsd-10-0-RC6:1.14
	netbsd-10-0-RC5:1.14
	netbsd-10-0-RC4:1.14
	netbsd-10-0-RC3:1.14
	netbsd-10-0-RC2:1.14
	netbsd-10-0-RC1:1.14
	netbsd-10:1.14.0.2
	netbsd-10-base:1.14
	netbsd-9-3-RELEASE:1.9
	cjep_sun2x-base1:1.13
	cjep_sun2x:1.13.0.2
	cjep_sun2x-base:1.13
	cjep_staticlib_x-base1:1.13
	netbsd-9-2-RELEASE:1.9
	cjep_staticlib_x:1.12.0.4
	cjep_staticlib_x-base:1.12
	netbsd-9-1-RELEASE:1.9
	phil-wifi-20200421:1.12
	phil-wifi-20200411:1.12
	is-mlppp:1.12.0.2
	is-mlppp-base:1.12
	phil-wifi-20200406:1.12
	netbsd-8-2-RELEASE:1.6
	netbsd-9-0-RELEASE:1.9
	netbsd-9-0-RC2:1.9
	netbsd-9-0-RC1:1.9
	phil-wifi-20191119:1.9
	netbsd-9:1.9.0.2
	netbsd-9-base:1.9
	phil-wifi-20190609:1.9
	netbsd-8-1-RELEASE:1.6
	netbsd-8-1-RC1:1.6
	pgoyette-compat-merge-20190127:1.6.12.1
	pgoyette-compat-20190127:1.8
	pgoyette-compat-20190118:1.8
	pgoyette-compat-1226:1.6
	pgoyette-compat-1126:1.6
	pgoyette-compat-1020:1.6
	pgoyette-compat-0930:1.6
	pgoyette-compat-0906:1.6
	netbsd-7-2-RELEASE:1.1.2.2
	pgoyette-compat-0728:1.6
	netbsd-8-0-RELEASE:1.6
	phil-wifi:1.6.0.14
	phil-wifi-base:1.6
	pgoyette-compat-0625:1.6
	netbsd-8-0-RC2:1.6
	pgoyette-compat-0521:1.6
	pgoyette-compat-0502:1.6
	pgoyette-compat-0422:1.6
	netbsd-8-0-RC1:1.6
	pgoyette-compat-0415:1.6
	pgoyette-compat-0407:1.6
	pgoyette-compat-0330:1.6
	pgoyette-compat-0322:1.6
	pgoyette-compat-0315:1.6
	netbsd-7-1-2-RELEASE:1.1.2.2
	pgoyette-compat:1.6.0.12
	pgoyette-compat-base:1.6
	netbsd-7-1-1-RELEASE:1.1.2.2
	matt-nb8-mediatek:1.6.0.10
	matt-nb8-mediatek-base:1.6
	perseant-stdc-iso10646:1.6.0.8
	perseant-stdc-iso10646-base:1.6
	netbsd-8:1.6.0.6
	netbsd-8-base:1.6
	prg-localcount2-base3:1.6
	prg-localcount2-base2:1.6
	prg-localcount2-base1:1.6
	prg-localcount2:1.6.0.4
	prg-localcount2-base:1.6
	pgoyette-localcount-20170426:1.6
	bouyer-socketcan-base1:1.6
	pgoyette-localcount-20170320:1.6
	netbsd-7-1:1.1.2.2.0.6
	netbsd-7-1-RELEASE:1.1.2.2
	netbsd-7-1-RC2:1.1.2.2
	netbsd-7-nhusb-base-20170116:1.1.2.2
	bouyer-socketcan:1.6.0.2
	bouyer-socketcan-base:1.6
	pgoyette-localcount-20170107:1.6
	netbsd-7-1-RC1:1.1.2.2
	pgoyette-localcount-20161104:1.6
	netbsd-7-0-2-RELEASE:1.1.2.2
	localcount-20160914:1.6
	netbsd-7-nhusb:1.1.2.2.0.4
	netbsd-7-nhusb-base:1.1.2.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.2
	pgoyette-localcount-base:1.2
	netbsd-7-0-1-RELEASE:1.1.2.2
	netbsd-7-0:1.1.2.2.0.2
	netbsd-7-0-RELEASE:1.1.2.2
	netbsd-7-0-RC3:1.1.2.2
	netbsd-7-0-RC2:1.1.2.2
	netbsd-7-0-RC1:1.1.2.2
	netbsd-7:1.1.0.2;
locks; strict;
comment	@# @;


1.14
date	2021.07.11.20.52.07;	author mrg;	state Exp;
branches;
next	1.13;
commitid	imHWyN1cvxi41C0D;

1.13
date	2021.05.30.22.24.36;	author joerg;	state Exp;
branches;
next	1.12;
commitid	5rMv1CbSRO3wSdVC;

1.12
date	2020.02.09.12.28.28;	author jmcneill;	state Exp;
branches
	1.12.4.1;
next	1.11;
commitid	vAJTgkvLzzeISZVB;

1.11
date	2020.01.19.10.44.51;	author martin;	state Exp;
branches;
next	1.10;
commitid	ACqawtrRxSOXYhTB;

1.10
date	2020.01.19.00.58.15;	author jmcneill;	state Exp;
branches;
next	1.9;
commitid	rnaLnZIKTqeHJeTB;

1.9
date	2019.03.10.02.29.53;	author mrg;	state Exp;
branches;
next	1.8;
commitid	v9cy21Je6lIUmLeB;

1.8
date	2019.01.01.00.37.06;	author mrg;	state Exp;
branches;
next	1.7;
commitid	re5bd8HS5c69V06B;

1.7
date	2018.12.30.08.34.29;	author mrg;	state Exp;
branches;
next	1.6;
commitid	UiP0dpHbSuvwDN5B;

1.6
date	2016.08.19.16.33.23;	author christos;	state Exp;
branches
	1.6.12.1
	1.6.14.1;
next	1.5;
commitid	EnU5KPf0tvLG1Wiz;

1.5
date	2016.08.19.03.59.30;	author mrg;	state Exp;
branches;
next	1.4;
commitid	jBvUBpYuoiw1QRiz;

1.4
date	2016.08.17.00.10.19;	author mrg;	state Exp;
branches;
next	1.3;
commitid	Az3ynbyBwdrmEAiz;

1.3
date	2016.08.16.06.24.02;	author mrg;	state Exp;
branches;
next	1.2;
commitid	chz9GQ9meJ9sKuiz;

1.2
date	2015.09.19.23.00.44;	author wiz;	state Exp;
branches;
next	1.1;
commitid	g5gQKMoc6THAVUBy;

1.1
date	2015.03.01.07.46.04;	author mrg;	state Exp;
branches
	1.1.2.1;
next	;
commitid	AhqQ4PNrDFjvmSby;

1.12.4.1
date	2021.05.31.22.15.04;	author cjep;	state Exp;
branches;
next	;
commitid	eWz9SBW0XqKjJlVC;

1.6.12.1
date	2019.01.18.08.49.05;	author pgoyette;	state Exp;
branches;
next	;
commitid	Lmlzg3OVT2cd6f8B;

1.6.14.1
date	2019.06.10.22.02.45;	author christos;	state Exp;
branches;
next	1.6.14.2;
commitid	jtc8rnCzWiEEHGqB;

1.6.14.2
date	2020.04.08.14.07.03;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.1.2.1
date	2015.03.01.07.46.04;	author snj;	state dead;
branches;
next	1.1.2.2;
commitid	doNCG3A8wme8rUcy;

1.1.2.2
date	2015.03.09.08.45.26;	author snj;	state Exp;
branches;
next	;
commitid	doNCG3A8wme8rUcy;


desc
@@


1.14
log
@xorg/lib stuff to enable mesa.old, prepare for new mesa

- rename OLD_PREFIX to OLD_SUFFIX, since it is
- include mesa-which.mk and use ${OLD_SUFFIX} in several places
- remove mesa < 18 support
@
text
@#	$NetBSD: Makefile,v 1.13 2021/05/30 22:24:36 joerg Exp $

.include <bsd.own.mk>

.include "../../../lib/mesa-which.mk"

DRIVER=		xf86-video-ati-kms
DRIVER_NAME=	radeon_drv

LIBDPLIBS+=	drm_radeon ${.CURDIR}/../../../lib/libdrm_radeon

.if ${XORG_SERVER_SUBDIR} == "xorg-server.old"
CPPFLAGS+=	-DUSE_XAA
.else
CPPFLAGS+= \
		-DHAS_DIRTYTRACKING2 \
		-DHAVE_XORG_LIST \
		-DHAVE_XF86_CURSOR_RESET_CURSOR \
		-DHAVE_MISYNCSHM_H \
		-DHAVE_PRESENT_H
.endif

SRCS.EXA=	radeon_exa.c r600_exa.c r6xx_accel.c \
		r600_textured_videofuncs.c r600_shader.c radeon_exa_shared.c \
		evergreen_exa.c evergreen_accel.c evergreen_shader.c \
		evergreen_textured_videofuncs.c cayman_accel.c cayman_shader.c
SRCS.KMS=	radeon_dri2.c radeon_dri3.c radeon_drm_queue.c radeon_kms.c \
		radeon_present.c radeon_sync.c radeon_vbo.c radeon_bo_helper.c \
		drmmode_display.c

.if ${HAVE_XORG_GLAMOR} != "no"
SRCS.GLAMOR=	radeon_glamor.c radeon_glamor_wrappers.c
CPPFLAGS+= \
		-DHAVE_GLAMOR_H \
		-DUSE_GLAMOR
.else
SRCS.GLAMOR=
.endif

SRCS=		radeon_accel.c radeon_video.c \
		radeon_misc.c radeon_probe.c \
		radeon_textured_video.c radeon_xvmc.c \
		$(SRCS.EXA) \
		$(SRCS.KMS) \
		$(SRCS.GLAMOR)

MAN=		radeon.4

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
MANSUBDIR=	/x86
.else
MANSUBDIR=	/${MACHINE}
.endif

CPPFLAGS+=	-DHAVE_CONFIG_H
CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/X11 \
		-I${DESTDIR}${X11INCDIR}/X11/dri \
		-I${DESTDIR}${X11INCDIR}/libdrm \
		-I${DESTDIR}${X11INCDIR}/pixman-1 \
		-I${X11SRCDIR.${DRIVER}}/../include

LIBDPLIBS+=	gbm ${.CURDIR}/../../../lib/libgbm${OLD_SUFFIX}

COPTS+=		-fcommon

.include "../Makefile.xf86-driver"
@


1.13
log
@Various X drivers still need -fcommon, so add it.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2020/02/09 12:28:28 jmcneill Exp $
d62 1
a62 1
LIBDPLIBS+=	gbm ${.CURDIR}/../../../lib/libgbm${OLD_PREFIX}
@


1.12
log
@Do not define HAVE_DRI3_H
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2020/01/19 10:44:51 martin Exp $
d64 2
@


1.12.4.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2021/05/30 22:24:36 joerg Exp $
a63 2
COPTS+=		-fcommon

@


1.11
log
@Fix conditional in previous
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2020/01/19 00:58:15 jmcneill Exp $
a18 1
		-DHAVE_DRI3_H \
@


1.10
log
@Build radeon and nouveau drivers on evbarm.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2019/03/10 02:29:53 mrg Exp $
d50 1
a50 1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
@


1.9
log
@move mesa10 build into .old scheme:

- add ${X11SRCDIR.MesaLib.old} and introduce ${X11SRCDIR.Mesa} as an
  alias for either the former or the non old.  this allows many of
  the makefiles to simply use ${X11SRCDIR.Mesa} (but does not really
  enable much sharing of makefiles, but reduces their diffs.)

- use mesa-which.mk to define ${OLD_PREFIX} to either "" or ".old",
  and to know if to build 'dri7' (.old only.)  ${OLD_PREFIX} is used
  by other code (eg, LIBDPLIBS) to pick the right subdir.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2019/01/01 00:37:06 mrg Exp $
d49 2
d52 3
@


1.8
log
@build fixes for xorg-server 1.20 parts:

- define HAVE_XF86_CURSOR_RESET_CURSOR for several drivers that now
  look for it.
- remove various -Wno* options no longer needed, in particular the
  global -Wno-error in the radeon and radeon-kms drivers
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2018/12/30 08:34:29 mrg Exp $
d5 2
d58 1
a58 1
LIBDPLIBS+=	gbm ${.CURDIR}/../../../lib/libgbm
@


1.7
log
@link against libgbm.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2016/08/19 16:33:23 christos Exp $
d19 1
a19 2
		-DHAVE_PRESENT_H \
		-DHAVE_XF86_CURSOR_RESET_CURSOR
a57 3
# XXX
COPTS+=	-Wno-error

@


1.6
log
@fix reversed test
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2016/08/19 03:59:30 mrg Exp $
d57 2
@


1.6.14.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2019/03/10 02:29:53 mrg Exp $
a4 2
.include "../../../lib/mesa-which.mk"

d19 2
a20 1
		-DHAVE_PRESENT_H
d57 2
a58 1
LIBDPLIBS+=	gbm ${.CURDIR}/../../../lib/libgbm${OLD_PREFIX}
@


1.6.14.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
d19 1
a48 2

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
a49 3
.else
MANSUBDIR=	/${MACHINE}
.endif
@


1.6.12.1
log
@Synch with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2016/08/19 16:33:23 christos Exp $
d19 2
a20 1
		-DHAVE_PRESENT_H
d57 2
a58 1
LIBDPLIBS+=	gbm ${.CURDIR}/../../../lib/libgbm
@


1.5
log
@- introduce HAVE_XORG_GLAMOR which is set to yes on xorg-server 1.18
  and x86 ports only so far.
- build glamor extension.
- fix debug set lists for xorg-server 1.18
- install xf86-video-amdgpu driver on xorg-server 1.8 and x86
- clean up radeon-kms Makefile and enable glamor xorg-server 1.8
- clean up various obsolete makefile parts
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2016/08/17 00:10:19 mrg Exp $
a31 2
SRCS.GLAMOR=
.else
d36 2
@


1.4
log
@clean up some obsolete and duplicated code.  port to xf86-video-ati 7.7.0.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2016/08/16 06:24:02 mrg Exp $
a7 7
.PATH:  ${X11SRCDIR.${DRIVER}}/src/AtomBios
SRCS.ATOMBIOS= \
        CD_Operations.c \
        Decoder.c \
        hwserv_drv.c

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
a8 1
.endif
d13 2
a14 1
CPPFLAGS+=	-DHAS_DIRTYTRACKING2 \
d19 2
a20 1
		-DHAVE_PRESENT_H
d30 4
a33 1
# XXX not yet
d35 4
d44 2
a45 1
		$(SRCS.KMS)
@


1.3
log
@define HAVE_XAA_H in Makefile.xf86-driver for xorg-server 1.10 only,
move it out of many driver makefiles.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2015/09/19 23:00:44 wiz Exp $
d14 2
a15 3
.if ${X11DRI} != "no"
SRCS.DRI=	radeon_dri.c
CPPFLAGS+=	${X11FLAGS.DRI}
d21 6
a26 10
CPPFLAGS+=	-DHAS_DIRTYTRACKING2 -DHAVE_XORG_LIST
.endif

.if ${X11DRI} != "no"
# XXX
. if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
SRCS.KMS=	radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c
CPPFLAGS+=	-DXF86DRM_MODE
LIBDPLIBS+=	drm_radeon ${.CURDIR}/../../../lib/libdrm_radeon
. endif
d33 3
a35 2
SRCS.KMS=	radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c \
		radeon_bo_helper.c
d37 1
a37 1
SRCS.GLAMOR=	radeon_glamor.c
@


1.2
log
@Install radeon(4) from radeon-kms into x86 subdir.

This way, there is no file name issue with radeon(4) from
the old not-kms driver; and subdir man pages are preferred
to non-subdir.

Addresses MKREPRO issue from PR 50132.

XXX: This will stop being correct if radeon-kms is ported to more
platforms like sparc64.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2015/03/01 07:46:04 mrg Exp $
d19 6
@


1.1
log
@add build framework to choose between xf86-video-ati 6.x (UMS/KMS)
and 7.x (KMS only), and switch x86 to the latest (KMS only) version.

(if someone can make x86 install both radeon_drv.so.[67] and leave
the default symlink to .7, that would be nice.  renaming it so that
it's easier to choose via xorg.conf is a little more tricky..)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2014/08/11 08:25:58 mrg Exp $
d43 2
a44 1
MAN=	radeon.4
@


1.1.2.1
log
@file Makefile was added on branch netbsd-7 on 2015-03-09 08:45:26 +0000
@
text
@d1 55
@


1.1.2.2
log
@Pull up following revision(s) (requested by mrg in ticket #575):
	distrib/sets/mkvars.mk: revision 1.16
	distrib/sets/sets.subr: revision 1.163
	distrib/sets/lists/xdebug/md.amd64: revision 1.11
	distrib/sets/lists/xdebug/md.i386: revision 1.12
	distrib/sets/lists/xserver/md.amd64: revision 1.76
	distrib/sets/lists/xserver/md.i386: revision 1.95
	external/mit/xorg/server/drivers/Makefile: revision 1.64
	external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile: revision 1.1
	share/mk/bsd.README: revision 1.338
	share/mk/bsd.own.mk: revision 1.844
add build framework to choose between xf86-video-ati 6.x (UMS/KMS)
and 7.x (KMS only), and switch x86 to the latest (KMS only) version.
(if someone can make x86 install both radeon_drv.so.[67] and leave
the default symlink to .7, that would be nice.  renaming it so that
it's easier to choose via xorg.conf is a little more tricky..)
@
text
@a0 55
#	$NetBSD$

.include <bsd.own.mk>

DRIVER=		xf86-video-ati-kms
DRIVER_NAME=	radeon_drv

.PATH:  ${X11SRCDIR.${DRIVER}}/src/AtomBios
SRCS.ATOMBIOS= \
        CD_Operations.c \
        Decoder.c \
        hwserv_drv.c

.if ${X11DRI} != "no"
SRCS.DRI=	radeon_dri.c
CPPFLAGS+=	${X11FLAGS.DRI}
.endif

.if ${X11DRI} != "no"
# XXX
. if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
SRCS.KMS=	radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c
CPPFLAGS+=	-DXF86DRM_MODE
LIBDPLIBS+=	drm_radeon ${.CURDIR}/../../../lib/libdrm_radeon
. endif
.endif

SRCS.EXA=	radeon_exa.c r600_exa.c r6xx_accel.c \
		r600_textured_videofuncs.c r600_shader.c radeon_exa_shared.c \
		evergreen_exa.c evergreen_accel.c evergreen_shader.c \
		evergreen_textured_videofuncs.c cayman_accel.c cayman_shader.c
SRCS.KMS=	radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c \
		radeon_bo_helper.c
# XXX not yet
SRCS.GLAMOR=	radeon_glamor.c

SRCS=		radeon_accel.c radeon_video.c \
		radeon_misc.c radeon_probe.c \
		radeon_textured_video.c radeon_xvmc.c \
		$(SRCS.EXA) \
		$(SRCS.KMS)

MAN=	radeon.4

CPPFLAGS+=	-DHAVE_CONFIG_H
CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/X11 \
		-I${DESTDIR}${X11INCDIR}/X11/dri \
		-I${DESTDIR}${X11INCDIR}/libdrm \
		-I${DESTDIR}${X11INCDIR}/pixman-1 \
		-I${X11SRCDIR.${DRIVER}}/../include

# XXX
COPTS+=	-Wno-error

.include "../Makefile.xf86-driver"
@


