From f4666cfbc5b8cc10e287675b443ee2c3e6ae1138 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 6 Jan 2004 12:30:13 +0000 Subject: [PATCH] - factorize some common per-platform definintions into a new Makefile.common - conditionalise more of the main subdirs based on XSERVER_XXX variables, and set these as necessary in Makefile.common XXX: perhaps list the Xwhat -> X symlink name in Makefile.common? --- x11/Xserver/Makefile | 30 ++++++++++++++------- x11/Xserver/Makefile.common | 48 ++++++++++++++++++++++++++++++++++ x11/Xserver/Makefile.serverlib | 3 +-- x11/Xserver/Xserver/Makefile | 20 ++++++++++---- x11/Xserver/hw/Makefile | 20 ++++++++------ 5 files changed, 97 insertions(+), 24 deletions(-) create mode 100644 x11/Xserver/Makefile.common diff --git a/x11/Xserver/Makefile b/x11/Xserver/Makefile index 84610478db05..97aa4a8546bc 100644 --- a/x11/Xserver/Makefile +++ b/x11/Xserver/Makefile @@ -1,17 +1,29 @@ -# $NetBSD: Makefile,v 1.8 2004/01/03 02:05:49 takemura Exp $ +# $NetBSD: Makefile,v 1.9 2004/01/06 12:30:13 mrg Exp $ .include -.if ${MACHINE} != "sparc" && ${MACHINE} != "sparc64" && ${MACHINE} != "hpcmips" -SUBDIR.md=fontbase Xfont +.include "Makefile.common" + +.if ${XSERVER_NEEDS_XFONT} != "no" +SUBDIR.xfont=fontbase Xfont .endif -SUBDIR= include \ - .WAIT \ - dix os mi printer Xext xkb xinput GL lbx dbe record randr render \ - xtrap mfb cfb cfb16 cfb24 cfb32 fb hw ${SUBDIR.md} \ - .WAIT \ - Xserver +.if ${XSERVER_HAS_CFB} == "no" +SUBDIR.cfb= +.else +SUBDIR.cfb=cfb cfb16 cfb24 cfb32 +.endif + +.if ${XSERVER_HAS_FB} == "no" +SUBDIR.fb= +.else +SUBDIR.fb=fb +.endif + +SUBDIR= include +SUBDIR+= .WAIT dix os mi printer Xext xkb xinput GL lbx dbe record +SUBDIR+= mfb randr render xtrap +SUBDIR+= ${SUBDIR.cfb} ${SUBDIR.fb} hw ${SUBDIR.xfont} .WAIT Xserver XTODO= afb miext/shadow miext/layer hw/xfree86 diff --git a/x11/Xserver/Makefile.common b/x11/Xserver/Makefile.common new file mode 100644 index 000000000000..66abbad3db5e --- /dev/null +++ b/x11/Xserver/Makefile.common @@ -0,0 +1,48 @@ +# $NetBSD: Makefile.common,v 1.1 2004/01/06 12:30:13 mrg Exp $ + +# These define parts of the Xserver tree that are to be +# conditionally compiled for different platforms. See +# below for descriptions of each variable. + +# XFree86 servers all need XFONT as well. +.if ${MACHINE} == "i386" || ${MACHINE} == "amd64" || \ + ${MACHINE} == "macppc" || ${MACHINE} == "cats" +XSERVER_NEEDS_XFONT= yes +XSERVER_XFREE86= yes +.endif + +.if ${MACHINE} == "macppc" +XSERVER_XMACPPC= yes +.endif + +.if ${MACHINE} == "sparc" || ${MACHINE} == "sparc64" +XSERVER_XSUN= yes +.endif + +.if ${MACHINE} == "vax" +XSERVER_HAS_CFB= no +XSERVER_HAS_FB= no +XSERVER_XVFB= no +.endif + +.if ${MACHINE} == "hpcmips" +XSERVER_XHPC= yes +.endif + +# Does this server need Xfont/fontbase libraries? +XSERVER_NEEDS_XFONT?= no +# Does this server use cfb* libraries? +XSERVER_HAS_CFB?= yes +# Does this server use fb library? +XSERVER_HAS_FB?= yes + +# Does this platform build XFree86 X server? +XSERVER_XFREE86?= no +# Does this platform build Xmacppc X server? +XSERVER_XMACPPC?= no +# Does this platform build Xsun* X servers? (split?) +XSERVER_XSUN?= no +# Does this platform build Xhpc X servers? +XSERVER_XHPC?= no +# Does this platform build Xvfb X server? +XSERVER_XVFB?= no diff --git a/x11/Xserver/Makefile.serverlib b/x11/Xserver/Makefile.serverlib index 3da00054a3e9..3e172f3df494 100644 --- a/x11/Xserver/Makefile.serverlib +++ b/x11/Xserver/Makefile.serverlib @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.serverlib,v 1.3 2003/12/26 08:23:30 rtr Exp $ +# $NetBSD: Makefile.serverlib,v 1.4 2004/01/06 12:30:13 mrg Exp $ NOLINT= 1 @@ -24,4 +24,3 @@ CPPFLAGS+= ${X11FLAGS.SERVER} -DX_BYTE_ORDER=${X_BYTE_ORDER} .if defined(XMODULEDIR) CPPFLAGS+= ${X11FLAGS.LOADABLE} .endif - diff --git a/x11/Xserver/Xserver/Makefile b/x11/Xserver/Xserver/Makefile index a2768f8e696f..79c700ea15c6 100644 --- a/x11/Xserver/Xserver/Makefile +++ b/x11/Xserver/Xserver/Makefile @@ -1,14 +1,24 @@ -# $NetBSD: Makefile,v 1.6 2004/01/03 02:05:49 takemura Exp $ +# $NetBSD: Makefile,v 1.7 2004/01/06 12:30:13 mrg Exp $ .include -SUBDIR= Xnest Xprt Xvfb +.include "../Makefile.common" -.if ${MACHINE} == "sparc" || ${MACHINE} == "sparc64" +SUBDIR= Xnest Xprt + +.if ${XSERVER_XVFB} != "no" +SUBDIR+= Xvfb +.endif + +.if ${XSERVER_XSUN} == "yes" SUBDIR+= Xsun Xsun24 XsunMono -.elif ${MACHINE} == "hpcmips" +.endif + +.if ${XSERVER_XHPC} == "yes" SUBDIR+= Xhpc -.else +.endif + +.if ${XSERVER_XFREE86} == "yes" SUBDIR+= XFree86 .endif diff --git a/x11/Xserver/hw/Makefile b/x11/Xserver/hw/Makefile index 68ed924765e7..51c9c974c657 100644 --- a/x11/Xserver/hw/Makefile +++ b/x11/Xserver/hw/Makefile @@ -1,23 +1,27 @@ -# $NetBSD: Makefile,v 1.6 2004/01/03 02:05:49 takemura Exp $ +# $NetBSD: Makefile,v 1.7 2004/01/06 12:30:13 mrg Exp $ -SUBDIR= vfb xnest +.include "../Makefile.common" -.if ${MACHINE} == "sparc" || ${MACHINE} == "sparc64" +SUBDIR= xnest + +.if ${XSERVER_XVFB} != "no" +SUBDIR+=vfb +.endif + +.if ${XSERVER_XSUN} != "no" SUBDIR+=sun .endif -.if ${MACHINE} == "i386" || ${MACHINE} == "amd64" || \ - ${MACHINE} == "macppc" || ${MACHINE} == "cats" +.if ${XSERVER_XFREE86} != "no" SUBDIR+=xfree86 .endif -.if ${MACHINE} == "macppc" +.if ${XSERVER_XMACPPC} != "no" SUBDIR+=netbsd/macppc .endif -.if ${MACHINE} == "hpcmips" +.if ${XSERVER_XHPC} != "no" SUBDIR+=netbsd/hpc .endif - .include