Makefile.inc revision 1.8
11.8Sriastrad# $NetBSD: Makefile.inc,v 1.8 2022/07/17 15:05:09 riastradh Exp $
21.2Sriastrad
31.2Sriastrad# Common makefile cruft for drm2 code.
41.2Sriastrad
51.2Sriastrad# XXX All the -D crap needs to go in a header file instead so changing
61.2Sriastrad# it correctly triggers rebuilds.
71.2Sriastrad
81.6SriastradCOPTS+=		-fwrapv
91.6Sriastrad
101.5Sriastrad# Overrides first.
111.2SriastradCPPFLAGS+=	-I${S}/external/bsd/drm2/include
121.6SriastradCPPFLAGS+=	-I${S}/external/bsd/drm2/include/drm
131.5Sriastrad
141.5SriastradCPPFLAGS+=	-I${S}/external/bsd/common/include
151.5Sriastrad
161.5Sriastrad# Then upstream.
171.4SriastradCPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include
181.4SriastradCPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include/drm
191.6SriastradCPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include/uapi
201.5Sriastrad
211.6SriastradCPPFLAGS+=	-D__KERNEL__
221.5Sriastrad
231.6Sriastrad.if ${MACHINE_ARCH} == "i386"
241.6SriastradCPPFLAGS+=	-DCONFIG_X86
251.6SriastradCPPFLAGS+=	-DCONFIG_X86_PAT
261.6Sriastrad.elif ${MACHINE_ARCH} == "x86_64"
271.6SriastradCPPFLAGS+=	-DCONFIG_X86
281.6SriastradCPPFLAGS+=	-DCONFIG_X86_64
291.6SriastradCPPFLAGS+=	-DCONFIG_X86_PAT
301.6Sriastrad.elif ${MACHINE} == "evbarm"
311.6SriastradCPPFLAGS+=	-DCONFIG_ARM
321.6Sriastrad.elif ${MACHINE_ARCH} == "aarch64"
331.7SriastradCPPFLAGS+=	-DCONFIG_ARM64
341.6Sriastrad.endif
351.2Sriastrad
361.5SriastradCPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE=0
371.5SriastradCPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0
381.7SriastradCPPFLAGS+=	-DCONFIG_DRM_FBDEV_EMULATION=1
391.7SriastradCPPFLAGS+=	-DCONFIG_DRM_FBDEV_OVERALLOC=100
401.5SriastradCPPFLAGS+=	-DCONFIG_FB=0
411.6SriastradCPPFLAGS+=	-DCONFIG_LOCKDEP=0
421.6SriastradCPPFLAGS+=	-DCONFIG_PCI=1
431.6Sriastrad
441.6SriastradCWARNFLAGS+=	-Wno-missing-field-initializers
451.5Sriastrad
461.8Sriastrad# Needed for drmums modules.
471.8SriastradCPPFLAGS+=	-DCONFIG_DRM_LEGACY
481.8Sriastrad
491.2Sriastrad# XXX Is this the right place to set this?
501.2SriastradCPPFLAGS+=	-DDIAGNOSTIC
51