Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#	$NetBSD: Makefile.xf86-driver,v 1.26 2019/01/03 23:25:52 mrg Exp $

LIBISMODULE=	yes
SHLIB_MAJOR=	${PACKAGE_MAJOR}

.include <bsd.own.mk>
.include <bsd.x11.mk>

LIB=	${DRIVER_NAME}
LIBDIR=	${X11USRLIBDIR}/modules/drivers

# Extract version from configure script if not set in makefile.
#
.if defined(DRIVER_VERSION)
PACKAGE_VERSION=	${DRIVER_VERSION}
.else
PRINT_PACKAGE_VERSION=	${TOOL_AWK} '/^PACKAGE_VERSION=/ {		\
				match($$1, "[0-9]+\\.[0-9]+\\.[0-9]+");	\
				version = substr($$1, RSTART, RLENGTH);	\
			} END { print version }'			\
			${X11SRCDIR.${DRIVER}}/configure

PACKAGE_VERSION!=	${PRINT_PACKAGE_VERSION}
.endif

PACKAGE_MAJOR=		${PACKAGE_VERSION:R:R}
PACKAGE_MINOR=		${PACKAGE_VERSION:R:E}
PACKAGE_PATCH=		${PACKAGE_VERSION:E}

CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/X11 \
		-I${DESTDIR}${X11INCDIR}/X11/dri \
		-I${DESTDIR}${X11INCDIR}/xorg \
		-I${DESTDIR}${X11INCDIR}/pixman-1 \
		-I${X11SRCDIR.xorg-server}/../include \
		${X11FLAGS.EXTENSION} \
		${X11FLAGS.SERVER} \
		-DHAVE_XORG_SERVER_1_1_0 \
		-DSERVER_1_5 \
		-DXSERVER_LIBPCIACCESS \
		-DHAVE_XEXTPROTO_71 \
		-DXFree86LOADER

.if ${XORG_SERVER_SUBDIR} == "xorg-server.old"
CPPFLAGS+=	-DHAVE_XAA_H
.endif

CPPFLAGS+=	-DPACKAGE_VERSION_MAJOR=${PACKAGE_MAJOR}
CPPFLAGS+=	-DPACKAGE_VERSION_MINOR=${PACKAGE_MINOR}
CPPFLAGS+=	-DPACKAGE_VERSION_PATCHLEVEL=${PACKAGE_PATCH}
CPPFLAGS+=	-DXORG_VERSION_CURRENT=${XORG_VERSION_CURRENT}

.PATH:	${X11SRCDIR.${DRIVER}}/src
.PATH:	${X11SRCDIR.${DRIVER}}/man
.PATH:	${X11SRCDIR.${DRIVER}}

DRIVER_TOPDIR:=${.PARSEDIR}
.if !exists(${X11SRCDIR.${DRIVER}}/../include) && !defined(DRIVER_NO_FAKE_INCLUDE)
CPPFLAGS+=	-DHAVE_CONFIG_H -I${DRIVER_TOPDIR}/fake-include
.endif

.include <bsd.lib.mk>