Introduce bsd.xconf.mk to set default config variables used

at several places in the Xenocara build in a central place instead
of duplicating the checks all over the place. ok oga@.
This commit is contained in:
matthieu 2008-03-25 23:41:50 +00:00
parent 736c23fba4
commit bbc31bf586
26 changed files with 95 additions and 85 deletions

View File

@ -1,4 +1,5 @@
# $OpenBSD: Makefile,v 1.14 2008/02/21 08:04:44 todd Exp $
# $OpenBSD: Makefile,v 1.15 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
SUBDIR= bdftopcf mkfontscale mkfontdir \
appres beforelight bitmap editres fonttosfnt fslsfonts \
@ -16,13 +17,12 @@ SUBDIR= bdftopcf mkfontscale mkfontdir \
xwud
# Font server doesn't link on architectures with static only libraries
.if ${MACHINE} != landisk && ${MACHINE} != "vax" && ${MACHINE_ARCH} != "m88k"
.if ${XENOCARA_HAVE_SHARED_LIBS:L} == "yes"
SUBDIR += xfs
.endif
# GL
.if ${MACHINE} != "sgi" && ${MACHINE} != "vax" && ${MACHINE_ARCH} != "m88k" \
&& ${MACHINE} != "landisk"
.if ${XENOCARA_BUILD_GL:L} == "yes"
SUBDIR += xdriinfo glxgears glxinfo
.endif

View File

@ -1,8 +1,6 @@
# $OpenBSD: Makefile,v 1.5 2008/03/23 15:09:21 simon Exp $
# $OpenBSD: Makefile,v 1.6 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
X11BASE?= /usr/X11R6
.include <bsd.xconf.mk>
PROG= cwm

View File

@ -1,11 +1,9 @@
# -*- makefile -*-
# $OpenBSD: Makefile.inc,v 1.4 2007/04/04 22:33:46 david Exp $
# $OpenBSD: Makefile.inc,v 1.5 2008/03/25 23:41:50 matthieu Exp $
.ifndef FVWM_MAKEFILE_INC
FVWM_MAKEFILE_INC = done
.include <bsd.own.mk>
X11BASE?= /usr/X11R6
.include <bsd.xconf.mk>
CFLAGS+= -I${X11BASE}/include -I${.CURDIR} -I${.CURDIR}/.. \
-I${.CURDIR}/../libs

View File

@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.5 2007/04/08 21:53:14 matthieu Exp $
.include <bsd.own.mk>
X11BASE?= /usr/X11R6
# $OpenBSD: Makefile,v 1.6 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
DIST= ${XSRCDIR}/dist/Mesa
GLXGEARS= ${DIST}/progs/xdemos
MANDIR= ${X11BASE}/man/cat

View File

@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.5 2007/04/08 21:53:14 matthieu Exp $
.include <bsd.own.mk>
X11BASE?= /usr/X11R6
# $OpenBSD: Makefile,v 1.6 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
DIST= ${XSRCDIR}/dist/Mesa
GLXINFO= ${DIST}/progs/xdemos
MANDIR= ${X11BASE}/man/cat

View File

@ -1,7 +1,6 @@
# $OpenBSD: Makefile,v 1.9 2008/03/19 20:31:09 matthieu Exp $
# $OpenBSD: Makefile,v 1.10 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
.include <bsd.own.mk>
X11BASE?= /usr/X11R6
PROG= ssh-askpass
SRCS= drawing.c dynlist.c resources.c x11-ssh-askpass.c
MANDIR= ${X11BASE}/man/cat

View File

@ -1,7 +1,5 @@
# $OpenBSD: Makefile,v 1.3 2007/04/09 11:14:25 matthieu Exp $
.include <bsd.own.mk>
X11BASE?= /usr/X11R6
# $OpenBSD: Makefile,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
PROG= xidle

View File

@ -1,4 +1,5 @@
# $OpenBSD: Makefile,v 1.8 2007/04/09 15:47:23 matthieu Exp $
# $OpenBSD: Makefile,v 1.9 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
PROG= xsystrace
MAN= xsystrace.1
@ -16,7 +17,6 @@ afterinstall:
${INSTALL_DATA} \
${.CURDIR}/Xsystrace.ad ${DESTDIR}/etc/X11/app-defaults/Xsystrace
X11BASE?= /usr/X11R6
MANDIR= ${X11BASE}/man/cat
obj: _xenocara_obj

View File

@ -1,4 +1,5 @@
# $OpenBSD: Makefile,v 1.10 2008/03/22 12:40:02 merdely Exp $
# $OpenBSD: Makefile,v 1.11 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
SUBDIR= icons resize
@ -22,7 +23,6 @@ SRCS= TekPrsTbl.c Tekproc.c VTPrsTbl.c button.c cachedGCs.c \
misc.c precompose.c print.c ptydata.c wcwidth.c screen.c \
scrollbar.c tabs.c util.c xstrings.c
X11BASE?= /usr/X11R6
MANDIR= ${X11BASE}/man/cat
XETC?= /etc/X11

View File

@ -1,4 +1,5 @@
# $OpenBSD: Makefile,v 1.3 2007/08/31 21:17:33 matthieu Exp $
# $OpenBSD: Makefile,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
PROG= xtsscale
MAN= xtsscale.1
@ -7,7 +8,6 @@ CPPFLAGS+= -I${X11BASE}/include -I${X11BASE}/include/freetype2
LDADD+= -L${X11BASE}/lib -lXft -lXrender -lX11 -lXau \
-lXdmcp -lfontconfig -lexpat -lfreetype -lz
X11BASE?= /usr/X11R6
MANDIR= ${X11BASE}/man/cat
obj: _xenocara_obj

View File

@ -1,7 +1,5 @@
# $OpenBSD: Makefile,v 1.3 2007/04/09 15:48:56 matthieu Exp $
.include <bsd.own.mk>
X11BASE?= /usr/X11R6
# $OpenBSD: Makefile,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
PROG=xvctl
MAN=xvctl.1

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.2 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.5 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2008/02/02 17:19:57 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
.if !defined(XENOCARA_BUILD_DRI) || ${XENOCARA_BUILD_DRI:L} != "yes"
.if ${XENOCARA_BUILD_DRI:L} != "yes"
CONFIGURE_ARGS+= --disable-dri
.endif

View File

@ -1,4 +1,6 @@
# $OpenBSD: Makefile,v 1.8 2008/03/21 21:07:48 oga Exp $
# $OpenBSD: Makefile,v 1.9 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
SUBDIR= freetype fontconfig libxtrans libXau libXdmcp \
libX11 libXext libXrender libXft libdmx libfontenc \
@ -9,14 +11,11 @@ SUBDIR= freetype fontconfig libxtrans libXau libXdmcp \
libXprintAppUtil libXrandr libXRes libXScrnSaver libXTrap \
libXtst libXv libXvMC libXxf86dga libXxf86misc libXxf86vm
DRM_ARCHES= alpha amd64 i386 macppc sparc64
.if ${XENOCARA_BUILD_DRI:L} == "yes"
SUBDIR+= libdrm
.endif
.for a in $(DRM_ARCHES)
SUBDIR_$a+= libdrm
.endfor
SUBDIR+= $(SUBDIR_$(MACHINE))
.if ${MACHINE} != "sgi" && ${MACHINE} != "vax"
.if ${XENOCARA_BUILD_GL:L} == "yes"
SUBDIR+= libGL libGLU libGLw
.endif

View File

@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.17 2008/02/12 21:09:27 matthieu Exp $
.include <bsd.own.mk>
# $OpenBSD: Makefile,v 1.18 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
.if defined(XENOCARA_BUILD_DRI) && ${XENOCARA_BUILD_DRI:L} == "yes"
.if ${XENOCARA_BUILD_DRI:L} == "yes"
SUBDIR=libmesa dri
.endif
@ -22,7 +22,7 @@ DRI_DRIVER_SEARCH_DIR= $(DRI_DRIVER_INSTALL_DIR)
INCSDIR= ${X11BASE}/include/GL
.if defined(XENOCARA_BUILD_DRI) && ${XENOCARA_BUILD_DRI:L} == "yes"
.if ${XENOCARA_BUILD_DRI:L} == "yes"
LDADD= -L${X11BASE}/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes -ldrm
.else
LDADD= -L${X11BASE}/lib -lXext -lX11
@ -51,7 +51,7 @@ CPPFLAGS+= \
-DHAVE_ALIAS \
-D_REENTRANT
.if defined(XENOCARA_BUILD_DRI) && ${XENOCARA_BUILD_DRI:L} == "yes"
.if ${XENOCARA_BUILD_DRI:L} == "yes"
CPPFLAGS+= -DGLX_DIRECT_RENDERING
.endif

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile.inc,v 1.4 2008/02/20 22:41:51 matthieu Exp $
.include <bsd.own.mk>
# $OpenBSD: Makefile.inc,v 1.5 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.xconf.mk>
MESA= ${.CURDIR}/../../../../dist/Mesa/src/mesa
TOP= ${.CURDIR}/../../../../dist/Mesa
DRI_DRIVER_INSTALL_DIR= ${X11BASE}/lib/modules/dri
X11BASE ?= /usr/X11R6
COMMON_SOURCES = \
driverfuncs.c \

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.2 2007/03/18 10:26:58 matthieu Exp $
# $OpenBSD: Makefile,v 1.3 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
FILES= automake.dep bsd.xorg.mk
FILES= automake.dep bsd.xconf.mk bsd.xorg.mk
all:

22
share/mk/bsd.xconf.mk Normal file
View File

@ -0,0 +1,22 @@
# $OpenBSD: bsd.xconf.mk,v 1.1 2008/03/25 23:41:50 matthieu Exp $
# Shared libs?
.if ${MACHINE} == landisk || ${MACHINE} == "mvme88k" || ${MACHINE} == "vax"
XENOCARA_HAVE_SHARED_LIBS?=no
.else
XENOCARA_HAVE_SHARED_LIBS?=yes
.endif
# Build DRI?
.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
XENOCARA_BUILD_DRI?=yes
.else
XENOCARA_BUILD_DRI?=no
.endif
# Build GL libs and apps
.if ${MACHINE} == "landisk" || ${MACHINE_ARCH} == "m88k" || ${MACHINE} == "sgi" || ${MACHINE} == vax
XENOCARA_BUILD_GL?=no
.else
XENOCARA_BUILD_GL?=yes
.endif

View File

@ -1,6 +1,6 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.20 2008/02/13 21:34:15 miod Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.21 2008/03/25 23:41:50 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
DIST= ${.CURDIR}
@ -27,12 +27,11 @@ NO_XF86_UTIL_${M} = --disable-xfree86-utils
.endfor
NO_XF86_UTIL_OPTION=${NO_XF86_UTIL_${MACHINE}}
.if ${MACHINE} != "landisk" && ${MACHINE} != "sgi" && ${MACHINE} != "vax" && \
${MACHINE_ARCH} != "m68k"
.if ${XENOCARA_BUILD_GL:L} == "yes"
MESA_SOURCE= --with-mesa-source=${XSRCDIR}/dist/Mesa
.endif
.if defined(XENOCARA_BUILD_DRI) && ${XENOCARA_BUILD_DRI:L} == "yes"
.if ${XENOCARA_BUILD_DRI:L} == "yes"
DRI_OPTION= --enable-dri --with-dri-driver-path=${X11BASE}/lib/modules/dri
.endif