NetBSD/share/mk/bsd.x11.mk

144 lines
3.6 KiB
Makefile
Raw Normal View History

2003-12-23 14:12:35 +03:00
# $NetBSD: bsd.x11.mk,v 1.12 2003/12/23 11:12:35 rtr Exp $
.include <bsd.init.mk>
BINDIR= ${X11BINDIR}
LIBDIR= ${X11USRLIBDIR}
MANDIR= ${X11MANDIR}
X11FLAGS.VERSION= -DOSMAJORVERSION=1 -DOSMINORVERSION=6 # XXX
# THREADS_DEFINES
X11FLAGS.THREADS= -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API \
-DXNO_MTSAFE_PWDAPI
# THREADS_DEFINES for libraries
X11FLAGS.THREADLIB= ${X11FLAGS.THREADS} -DUSE_NBSD_THREADLIB
# CONNECTION_FLAGS
X11FLAGS.CONNECTION= -DTCPCONN -DUNIXCONN -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN
# EXT_DEFINES
X11FLAGS.EXTENSION= -DMITMISC -DXTEST -DXTRAP -DXSYNC -DXCMISC -DXRECORD \
-DMITSHM -DBIGREQS -DXF86MISC -DDBE -DDPMSExtension \
-DEVI -DSCREENSAVER -DXV -DXVMC -DGLXEXT \
-DGLX_USE_MESA -DFONTCACHE -DRES
# ServerDefines
X11FLAGS.SERVER= -DSHAPE -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
-DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV \
-DPANORAMIX -DRENDER -DRANDR -DGCCUSESGAS \
-DAVOID_GLYPHBLT -DSINGLEDEPTH -DXvExtension \
-DXFree86Server -DXvMCExtension -DSMART_SCHEDULE \
-DBUILDDEBUG -DXResExtension -DNDEBUG -DX_BYTE_ORDER=0
# OS_DEFINES
X11FLAGS.OS_DEFINES= -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR \
-DDDXOSVERRORF
2003-12-23 14:12:35 +03:00
.if ${MACHINE} != "sparc"
# EXT_DEFINES
X11FLAGS.EXTENSION+= -DXF86VIDMODE
# ServerDefines
X11FLAGS.SERVER+= -DXINPUT -DXFree86XDGA -DXF86VIDMODE
2003-12-23 14:12:35 +03:00
.if ${MACHINE} != "sparc64"
# OS_DEFINES
X11FLAGS.OS_DEFINES+= -DDDXTIME
2003-12-23 14:12:35 +03:00
.else
# ServerDefines
X11FLAGS.SERVER+= -D_XSERVER64
.endif
.endif
.if ${MACHINE} == "i386" || ${MACHINE} == "macppc"
# LOADABLE
X11FLAGS.LOADABLE= -DXFree86LOADER -DIN_MODULE -DXFree86Module
.endif
# Commandline to convert 'XCOMM' comments to #
#
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
2003-09-13 04:16:10 +04:00
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:
${_MKTARGET_CREATE}
2003-10-18 19:37:29 +04:00
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 ${NONBINMODE} \
${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 (${MKMAN} != "no" && (${MAN:U} != "" || ${PROG:U} != "")) # {
cleandir: cleanx11man
cleanx11man:
rm -f ${MAN:U${PROG:D${PROG.1}}}
.endif # }
.SUFFIXES: .man .1 .3 .7
.man.1 .man.3 .man.7:
${_MKTARGET_CREATE}
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}