<bsd.x11.mk>: infrastructure to support reach-over builds of xsrc

This commit is contained in:
lukem 2003-09-12 07:40:34 +00:00
parent 6371ddf557
commit 5ec73d3c6d
2 changed files with 104 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.37 2003/05/31 20:33:17 thorpej Exp $
# $NetBSD: Makefile,v 1.38 2003/09/12 07:40:34 lukem Exp $
# @(#)Makefile 8.1 (Berkeley) 6/8/93
NOOBJ= # defined
@ -10,7 +10,7 @@ FILES= bsd.README bsd.doc.mk bsd.dep.mk bsd.endian.mk bsd.files.mk \
bsd.gcc.mk bsd.hostlib.mk bsd.hostprog.mk bsd.inc.mk bsd.info.mk \
bsd.init.mk bsd.kernobj.mk bsd.kinc.mk bsd.kmod.mk bsd.lib.mk \
bsd.links.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk bsd.prog.mk \
bsd.rpc.mk bsd.shlib.mk bsd.subdir.mk bsd.sys.mk sys.mk
bsd.rpc.mk bsd.shlib.mk bsd.subdir.mk bsd.sys.mk bsd.x11.mk sys.mk
FILESDIR=/usr/share/mk
.endif

102
share/mk/bsd.x11.mk Normal file
View File

@ -0,0 +1,102 @@
# $NetBSD: bsd.x11.mk,v 1.1 2003/09/12 07:40:34 lukem Exp $
.include <bsd.init.mk>
X11FLAGS.VERSION= -DOSMAJORVERSION=1 -DOSMINORVERSION=6 # XXX
X11FLAGS.THREADS= -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API \
-DXNO_MTSAFE_PWDAPI
X11FLAGS.THREADLIB= ${X11FLAGS.THREADS} -DUSE_NBSD_THREADLIB
X11FLAGS.CONNECTION= -DTCPCONN -DUNIXCONN -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN
X11FLAGS.EXTENSION= -DMITMISC -DXTEST -DXTRAP -DXSYNC -DXCMISC -DXRECORD \
-DMITSHM -DBIGREQS -DXF86VIDMODE -DXF86MISC -DDBE \
-DDPMSExtension -DEVI -DSCREENSAVER -DXV -DXVMC \
-DGLXEXT -DGLX_USE_MESA -DFONTCACHE -DRES
X11FLAGS.SERVER= -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
-DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV \
-DPANORAMIX -DRENDER -DRANDR -DGCCUSESGAS \
-DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH -DXFreeXDGA \
-DXvExtension -DXFree86LOADER -DXFree86Server \
-DXF86VIDMODE -DXvMCExtension -DSMART_SCHEDULE \
-DBUILDDEBUG -DXResExtension -DNDEBUG -DX_BYTE_ORDER=0
X11TOOL_UNXCOMM= sed -e '/^\# *[0-9][0-9]* *.*$$/d' \
-e '/^XCOMM$$/s//\#/' \
-e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/\#/'
CPPFLAGS+= -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO
CPPFLAGS+= -I${DESTDIR}/${X11INCDIR}
LDFLAGS+= -Wl,-rpath-link,${DESTDIR}${X11USRLIBDIR} \
-R${X11USRLIBDIR} \
-L${DESTDIR}${X11USRLIBDIR}
#
# .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:
@rm -f ${.TARGET}
${CPP} -undef -traditional \
${CPPSCRIPTFLAGS_${.TARGET}:U${CPPSCRIPTFLAGS}} \
< ${.IMPSRC} | ${X11TOOL_UNXCOMM} > ${.TARGET}
realall: ${CPPSCRIPTS}
clean: cleancppscripts
cleancppscripts:
rm -f ${CPPSCRIPTS}
.endif # }
#
# APPDEFS (app defaults) handling
#
.if defined(APPDEFS) # {
appdefsinstall:: ${APPDEFS:@S@${DESTDIR}${X11LIBDIR}/app-defaults/${S:T:R}@}
.PRECIOUS: ${APPDEFS:@S@${DESTDIR}${X11LIBDIR}/app-defaults/${S:T:R}@}
__appdefinstall: .USE
${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
.for S in ${APPDEFS:O:u}
${DESTDIR}${X11LIBDIR}/app-defaults/${S:T:R}: ${S} __appdefinstall
.endfor
realinstall: appdefsinstall
.endif # }
#
# .man page handling
#
.if (${MAN:U} != "" && ${MKMAN} != "no") # {
cleandir: cleanx11man
cleanx11man:
rm -f ${MAN}
.endif # }
.SUFFIXES: .man .1 .3 .7
.man.1 .man.3 .man.7:
rm -f ${.TARGET}
${CPP} -undef -traditional \
-D__apploaddir__=${X11ROOTDIR}/lib/X11/app-defaults \
-D__filemansuffix__=5 -D__libmansuffix__=3 \
-D__miscmansuffix__=7 -D__drivermansuffix__=4 \
-D__projectroot__=${X11ROOTDIR} \
-D__xorgversion__='"Release 6.6" "X Version 11"' \
-D__vendorversion__="XFree86 4.3.0-imakeicideII" \
${X11EXTRAMANDEFS} \
< ${.IMPSRC} | ${X11TOOL_UNXCOMM} > ${.TARGET}