2007-08-06 08:25:57 +04:00
|
|
|
# $NetBSD: bsd.x11.mk,v 1.56 2007/08/06 04:25:57 lukem Exp $
|
2003-09-12 11:40:34 +04:00
|
|
|
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
|
2003-09-14 00:10:44 +04:00
|
|
|
BINDIR= ${X11BINDIR}
|
|
|
|
LIBDIR= ${X11USRLIBDIR}
|
|
|
|
MANDIR= ${X11MANDIR}
|
|
|
|
|
2005-03-21 17:10:29 +03:00
|
|
|
COPTS+= -fno-strict-aliasing
|
|
|
|
|
2007-06-07 15:49:17 +04:00
|
|
|
.if defined(USE_SSP) && (${USE_SSP} != "no")
|
|
|
|
CPPFLAGS+= -DNO_ALLOCA
|
|
|
|
.endif
|
|
|
|
|
2003-09-12 11:40:34 +04:00
|
|
|
X11FLAGS.VERSION= -DOSMAJORVERSION=1 -DOSMINORVERSION=6 # XXX
|
|
|
|
|
2003-11-17 08:14:21 +03:00
|
|
|
# THREADS_DEFINES
|
2003-09-12 11:40:34 +04:00
|
|
|
X11FLAGS.THREADS= -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API \
|
|
|
|
-DXNO_MTSAFE_PWDAPI
|
|
|
|
|
2003-11-17 08:14:21 +03:00
|
|
|
# CONNECTION_FLAGS
|
Enable IPv6 in XFree86 4.4.0 reachover build. Usage is describe
in "/usr/X11R6/lib/X11/doc/RELNOTES". Note particularly that "tcp",
as in "X -nolisten tcp" or "xhost +tcp/host:0", now means *both*
IP transport protocols. Use "inet" or "inet6", instead, to specify
only one or the other.
XDMCP support for IPv6 -- such as it is -- is disabled, just as
it is in the native, out-of-the-box build. XDM-AUTHORIZATION-1
does not really support IPv6 addresses, in any case. (It is
possible to build "xdm" with -DIPv6, but that presumes support
for IPv6-mapped IPv4 addresses in the default installation, for
one thing, and there are unexplored issues with all that.)
2004-03-27 00:29:54 +03:00
|
|
|
X11FLAGS.CONNECTION= -DTCPCONN -DUNIXCONN -DHAS_STICKY_DIR_BIT \
|
2005-01-10 05:58:58 +03:00
|
|
|
-DHAS_FCHOWN
|
|
|
|
|
|
|
|
.if (${USE_INET6} != "no")
|
|
|
|
X11FLAGS.CONNECTION+= -DIPv6
|
|
|
|
.endif
|
2003-09-12 11:40:34 +04:00
|
|
|
|
2003-11-17 08:14:21 +03:00
|
|
|
# EXT_DEFINES
|
2003-09-12 11:40:34 +04:00
|
|
|
X11FLAGS.EXTENSION= -DMITMISC -DXTEST -DXTRAP -DXSYNC -DXCMISC -DXRECORD \
|
2003-12-20 17:24:29 +03:00
|
|
|
-DMITSHM -DBIGREQS -DXF86MISC -DDBE -DDPMSExtension \
|
|
|
|
-DEVI -DSCREENSAVER -DXV -DXVMC -DGLXEXT \
|
|
|
|
-DGLX_USE_MESA -DFONTCACHE -DRES
|
2003-09-12 11:40:34 +04:00
|
|
|
|
2004-03-04 16:14:57 +03:00
|
|
|
X11FLAGS.DRI= -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING \
|
|
|
|
-DGLX_USE_DLOPEN -DGLX_USE_MESA
|
|
|
|
|
|
|
|
.if ${X11DRI} != "no"
|
|
|
|
X11FLAGS.EXTENSION+= ${X11FLAGS.DRI}
|
|
|
|
.endif
|
|
|
|
|
2003-11-17 08:14:21 +03:00
|
|
|
# ServerDefines
|
2003-12-20 17:24:29 +03:00
|
|
|
X11FLAGS.SERVER= -DSHAPE -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
|
2003-09-12 11:40:34 +04:00
|
|
|
-DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV \
|
|
|
|
-DPANORAMIX -DRENDER -DRANDR -DGCCUSESGAS \
|
2003-12-20 17:24:29 +03:00
|
|
|
-DAVOID_GLYPHBLT -DSINGLEDEPTH -DXvExtension \
|
|
|
|
-DXFree86Server -DXvMCExtension -DSMART_SCHEDULE \
|
2003-12-23 18:36:45 +03:00
|
|
|
-DBUILDDEBUG -DXResExtension -DNDEBUG
|
|
|
|
|
2003-11-17 08:14:21 +03:00
|
|
|
# OS_DEFINES
|
2004-01-01 15:36:14 +03:00
|
|
|
X11FLAGS.OS_DEFINES= -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR \
|
2005-11-13 01:57:46 +03:00
|
|
|
-DDDXOSVERRORF -DDDXTIME -DUSB_HID
|
2003-12-20 17:24:29 +03:00
|
|
|
|
2004-01-18 09:38:16 +03:00
|
|
|
.if !(${MACHINE} == "acorn32" || \
|
|
|
|
${MACHINE} == "alpha" || \
|
|
|
|
${MACHINE} == "amiga" || \
|
|
|
|
${MACHINE} == "pmax" || \
|
2004-03-10 19:21:16 +03:00
|
|
|
${MACHINE} == "sun3" || \
|
2004-01-18 09:38:16 +03:00
|
|
|
${MACHINE} == "vax")
|
2003-12-20 17:24:29 +03:00
|
|
|
# EXT_DEFINES
|
|
|
|
X11FLAGS.EXTENSION+= -DXF86VIDMODE
|
|
|
|
|
|
|
|
# ServerDefines
|
2004-01-20 19:40:11 +03:00
|
|
|
X11FLAGS.SERVER+= -DXINPUT -DXFreeXDGA -DXF86VIDMODE
|
2004-01-18 08:43:16 +03:00
|
|
|
.endif
|
2003-12-20 17:24:29 +03:00
|
|
|
|
2004-01-18 11:24:16 +03:00
|
|
|
.if ${MACHINE_ARCH} == "alpha" || \
|
|
|
|
${MACHINE_ARCH} == "sparc64" || \
|
|
|
|
${MACHINE_ARCH} == "x86_64"
|
2003-12-23 14:12:35 +03:00
|
|
|
# ServerDefines
|
|
|
|
X11FLAGS.SERVER+= -D_XSERVER64
|
2004-01-25 05:15:51 +03:00
|
|
|
X11FLAGS.EXTENSION+= -D__GLX_ALIGN64
|
2003-12-23 14:12:35 +03:00
|
|
|
.endif
|
2003-12-20 17:24:29 +03:00
|
|
|
|
2004-01-18 09:38:16 +03:00
|
|
|
.if ${MACHINE} == "amd64" || \
|
|
|
|
${MACHINE} == "cats" || \
|
|
|
|
${MACHINE} == "i386" || \
|
2004-07-13 13:29:45 +04:00
|
|
|
${MACHINE} == "macppc" || \
|
2006-04-17 16:50:51 +04:00
|
|
|
${MACHINE} == "netwinder" || \
|
2005-03-26 13:31:51 +03:00
|
|
|
${MACHINE} == "sgimips" || \
|
2005-10-02 02:51:31 +04:00
|
|
|
${MACHINE} == "sparc64" || \
|
2006-12-21 04:45:32 +03:00
|
|
|
${MACHINE} == "sparc" || \
|
|
|
|
${MACHINE} == "shark"
|
2003-12-20 17:24:29 +03:00
|
|
|
# LOADABLE
|
2005-04-06 12:32:11 +04:00
|
|
|
X11FLAGS.LOADABLE= -DXFree86LOADER -DIN_MODULE -DXFree86Module \
|
|
|
|
-fno-merge-constants
|
2003-12-20 17:24:29 +03:00
|
|
|
.endif
|
2003-11-17 08:14:21 +03:00
|
|
|
|
2004-02-06 14:52:48 +03:00
|
|
|
# Extract X11VERSION
|
|
|
|
PRINTX11VERSION=awk '/^\#define XF86_VERSION_MAJOR/ {major = $$3} \
|
|
|
|
/^\#define XF86_VERSION_MINOR/ {minor = $$3} \
|
|
|
|
/^\#define XF86_VERSION_PATCH/ {patch = $$3} \
|
|
|
|
/^\#define XF86_VERSION_SNAP/ {snap = $$3} \
|
|
|
|
END { print "((("major") * 10000000) + (("minor") * 100000) + (("patch") * 1000) + "snap")"}' \
|
|
|
|
${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/xf86Version.h
|
2003-11-17 08:14:21 +03:00
|
|
|
|
2004-03-27 23:16:16 +03:00
|
|
|
# Commandline to convert 'XCOMM' comments and 'XHASH' to '#', among other
|
|
|
|
# things. Transformed from the "CppSedMagic" macro from "Imake.rules".
|
2003-11-17 08:14:21 +03:00
|
|
|
#
|
2004-03-27 23:16:16 +03:00
|
|
|
X11TOOL_UNXCOMM= sed -e '/^\# *[0-9][0-9]* *.*$$/d' \
|
|
|
|
-e '/^\#line *[0-9][0-9]* *.*$$/d' \
|
|
|
|
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
|
|
|
|
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
|
|
|
|
-e '/^[ ]*XHASH/s/XHASH/\#/' \
|
|
|
|
-e '/\@\@$$/s/\@\@$$/\\/'
|
2003-09-12 11:40:34 +04:00
|
|
|
|
2003-09-14 00:10:44 +04:00
|
|
|
|
2003-09-12 11:40:34 +04:00
|
|
|
CPPFLAGS+= -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO
|
2003-09-13 04:16:10 +04:00
|
|
|
CPPFLAGS+= -I${DESTDIR}${X11INCDIR}
|
2003-09-12 11:40:34 +04:00
|
|
|
|
2004-04-15 18:48:41 +04:00
|
|
|
.if ${MACHINE_ARCH} == "x86_64"
|
|
|
|
CPPFLAGS+= -D__AMD64__
|
|
|
|
.endif
|
|
|
|
|
2003-09-12 11:40:34 +04:00
|
|
|
LDFLAGS+= -Wl,-rpath-link,${DESTDIR}${X11USRLIBDIR} \
|
|
|
|
-R${X11USRLIBDIR} \
|
|
|
|
-L${DESTDIR}${X11USRLIBDIR}
|
|
|
|
|
2003-09-14 00:10:44 +04:00
|
|
|
|
2003-09-12 11:40:34 +04:00
|
|
|
#
|
|
|
|
# .cpp -> "" handling
|
|
|
|
# CPPSCRIPTS list of files/scripts to run through cpp
|
|
|
|
# CPPSCRIPTFLAGS extra flags to ${CPP}
|
|
|
|
# CPPSCRIPTFLAGS_fn extra flags to ${CPP} for file `fn'
|
|
|
|
#
|
|
|
|
.if defined(CPPSCRIPTS) # {
|
|
|
|
.SUFFIXES: .cpp
|
|
|
|
|
|
|
|
.cpp:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-10-18 19:37:29 +04:00
|
|
|
rm -f ${.TARGET}
|
2003-09-12 11:40:34 +04:00
|
|
|
${CPP} -undef -traditional \
|
|
|
|
${CPPSCRIPTFLAGS_${.TARGET}:U${CPPSCRIPTFLAGS}} \
|
|
|
|
< ${.IMPSRC} | ${X11TOOL_UNXCOMM} > ${.TARGET}
|
|
|
|
|
|
|
|
realall: ${CPPSCRIPTS}
|
|
|
|
|
|
|
|
clean: cleancppscripts
|
2004-01-29 03:02:04 +03:00
|
|
|
cleancppscripts: .PHONY
|
2003-09-12 11:40:34 +04:00
|
|
|
rm -f ${CPPSCRIPTS}
|
|
|
|
.endif # }
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# APPDEFS (app defaults) handling
|
|
|
|
#
|
|
|
|
.if defined(APPDEFS) # {
|
2004-01-29 03:21:31 +03:00
|
|
|
appdefsinstall:: .PHONY ${APPDEFS:@S@${DESTDIR}${X11LIBDIR}/app-defaults/${S:T:R}@}
|
|
|
|
.PRECIOUS: ${APPDEFS:@S@${DESTDIR}${X11LIBDIR}/app-defaults/${S:T:R}@}
|
2003-09-12 11:40:34 +04:00
|
|
|
|
|
|
|
__appdefinstall: .USE
|
2007-08-06 08:25:57 +04:00
|
|
|
${_MKTARGET_INSTALL}
|
2003-12-08 13:10:46 +03:00
|
|
|
${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${NONBINMODE} \
|
2006-03-16 21:43:34 +03:00
|
|
|
${.ALLSRC} ${.TARGET}
|
2003-09-12 11:40:34 +04:00
|
|
|
|
|
|
|
.for S in ${APPDEFS:O:u}
|
|
|
|
${DESTDIR}${X11LIBDIR}/app-defaults/${S:T:R}: ${S} __appdefinstall
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
realinstall: appdefsinstall
|
|
|
|
.endif # }
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# .man page handling
|
|
|
|
#
|
2003-09-14 00:39:45 +04:00
|
|
|
.if (${MKMAN} != "no" && (${MAN:U} != "" || ${PROG:U} != "")) # {
|
2003-09-12 11:40:34 +04:00
|
|
|
cleandir: cleanx11man
|
2004-01-29 03:02:04 +03:00
|
|
|
cleanx11man: .PHONY
|
2003-09-14 00:39:45 +04:00
|
|
|
rm -f ${MAN:U${PROG:D${PROG.1}}}
|
2003-09-12 11:40:34 +04:00
|
|
|
.endif # }
|
|
|
|
|
2004-01-01 10:02:27 +03:00
|
|
|
.SUFFIXES: .man .1 .3 .4 .5 .7
|
2003-09-12 11:40:34 +04:00
|
|
|
|
2004-01-01 12:30:31 +03:00
|
|
|
.man.1 .man.3 .man.4 .man.5 .man.7:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-09-12 11:40:34 +04:00
|
|
|
rm -f ${.TARGET}
|
2004-12-02 19:33:47 +03:00
|
|
|
sed -e 's/\\$$/\\ /' ${.IMPSRC} \
|
|
|
|
| ${CPP} -undef -traditional \
|
2003-09-12 11:40:34 +04:00
|
|
|
-D__apploaddir__=${X11ROOTDIR}/lib/X11/app-defaults \
|
2004-04-29 04:48:04 +04:00
|
|
|
-D__libmansuffix__=3 \
|
|
|
|
-D__filemansuffix__=5 \
|
|
|
|
-D__miscmansuffix__=7 \
|
|
|
|
-D__drivermansuffix__=4 \
|
|
|
|
-D__adminmansuffix__=8 \
|
2003-09-12 11:40:34 +04:00
|
|
|
-D__projectroot__=${X11ROOTDIR} \
|
|
|
|
-D__xorgversion__='"Release 6.6" "X Version 11"' \
|
2005-03-19 20:27:46 +03:00
|
|
|
-D__vendorversion__="XFree86 4.5.0" \
|
2003-09-12 11:40:34 +04:00
|
|
|
${X11EXTRAMANDEFS} \
|
2004-12-02 19:33:47 +03:00
|
|
|
| ${X11TOOL_UNXCOMM} > ${.TARGET}
|