Home | History | Annotate | Line # | Download | only in common
      1 #	$NetBSD: Makefile,v 1.35 2022/07/15 04:18:55 mrg Exp $
      2 
      3 .include <bsd.own.mk>
      4 
      5 .include "../../../Makefile.serverlib"
      6 .include "../../../Makefile.servermod"
      7 
      8 LIB=	common
      9 
     10 .PATH:	${X11SRCDIR.xorg-server}/hw/xfree86/common
     11 SRCS.xv=	xf86xv.c xf86xvmc.c
     12 SRCS.bus=	xf86pciBus.c xf86fbBus.c xf86noBus.c
     13 SRCS.randr=	xf86RandR.c
     14 
     15 SRCS=	xf86Configure.c xf86Bus.c xf86Config.c \
     16 	xf86Cursor.c xf86DGA.c xf86DPMS.c \
     17 	xf86Events.c xf86Globals.c xf86AutoConfig.c \
     18 	xf86Option.c xf86Init.c \
     19 	xf86VidMode.c xf86fbman.c xf86cmap.c \
     20 	xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \
     21 	xf86Mode.c xorgHelper.c \
     22 	${SRCS.xv} ${SRCS.bus} ${SRCS.randr} \
     23 	xf86DefModeSet.c \
     24 	xf86VGAarbiter.c \
     25 	xf86Extensions.c \
     26 	xf86platformBus.c
     27 
     28 .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
     29 SRCS.bus+=	xf86sbusBus.c
     30 .endif
     31 
     32 CLEANFILES+=	xf86DefModeSet.c
     33 xf86DefModeSet.c:
     34 	${_MKTARGET_CREATE}
     35 	cat \
     36 	${X11SRCDIR.xorg-server}/hw/xfree86/common/vesamodes \
     37 	${X11SRCDIR.xorg-server}/hw/xfree86/common/extramodes | \
     38 	${TOOL_AWK} -f ${X11SRCDIR.xorg-server}/hw/xfree86/common/modeline2c.awk > ${.TARGET}
     39 	@echo >> ${.TARGET}
     40 
     41 CPPFLAGS+=	-I${X11SRCDIR.xorg-server}/hw/xfree86/common \
     42 		-I${X11SRCDIR.xorg-server}/hw/xfree86/os-support \
     43 		-I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bus \
     44                 -I${X11SRCDIR.xorg-server}/mfb \
     45                 -I${X11SRCDIR.xorg-server}/mi \
     46 		-I${X11SRCDIR.xorg-server}/include \
     47 		-I${X11SRCDIR.xorg-server}/os \
     48 		-I${X11SRCDIR.xorg-server}/Xext \
     49 		-I${DESTDIR}${X11INCDIR}/X11 \
     50 		-I${DESTDIR}${X11INCDIR}/X11/extensions \
     51 		-I${DESTDIR}${X11INCDIR}/pixman-1 \
     52 		-I${DESTDIR}${X11INCDIR}/xorg \
     53                 -I${X11SRCDIR.xorg-server}/Xi \
     54                 -I${X11SRCDIR.xorg-server}/hw/xfree86/ddc \
     55 		-I${X11SRCDIR.xorg-server}/hw/xfree86/modes \
     56 		-I${X11SRCDIR.xorg-server}/hw/xfree86/i2c \
     57 		-I${X11SRCDIR.xorg-server}/hw/xfree86 \
     58                 -I${X11SRCDIR.xorg-server}/hw/xfree86/parser \
     59                 -I${X11SRCDIR.xorg-server}/hw/xfree86/loader \
     60 		-I${X11SRCDIR.xorg-server}/hw/xfree86/vgahw \
     61 		-I${X11SRCDIR.xorg-server}/hw/xfree86/rac \
     62 		-I${X11SRCDIR.xorg-server}/hw/xfree86/vbe \
     63 		-I${X11SRCDIR.xorg-server}/hw/xfree86/int10 \
     64 		-I${X11SRCDIR.xorg-server}/render \
     65 		-I${X11SRCDIR.xorg-server}/randr \
     66 		-I. \
     67 		-I${X11SRCDIR.xorg-server}/../include \
     68 		-D__${MACHINE}
     69 
     70 CPPFLAGS+=	${X11FLAGS.EXTENSION} ${X11FLAGS.OS_DEFINES} \
     71 		${X11FLAGS.DIX} \
     72 		-DWSCONS_SUPPORT -D__XKBDEFRULES__='"xorg"' \
     73 		-D__XSERVERNAME__='"Xorg"' -D__XCONFIGFILE__='"xorg.conf"' \
     74 		-D__VENDORDWEBSUPPORT__='"http://wiki.x.org"' \
     75 		-DXVENDORNAME='"The X.Org Foundation"'
     76 
     77 .if ${MACHINE_ARCH} == "i386"
     78 CPPFLAGS+=	-DPCCONS_SUPPORT -DPCVT_SUPPORT
     79 .endif
     80 
     81 .if ${MACHINE} == "cats" || ${MACHINE} == "ofppc"
     82 CPPFLAGS+=	-DPCVT_SUPPORT
     83 .endif
     84 
     85 CPPFLAGS+=	-DCONFIG_WSCONS
     86 
     87 OS_RELEASE!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
     88 
     89 DRIVERS=	mga glint nv tga s3 s3virge sis rendition neomagic \
     90 		i740 tdfx savage cirrus vmware tseng trident chips \
     91 		apm i128
     92 DRIVERS+=	ati i810 ark cyrix siliconmotion via fbdev vesa \
     93 		dummy
     94 
     95 IDRIVERS=	mouse keyboard acecad calcomp citron digitaledge \
     96 		dmc dynapro elographics tek4957 microtouch \
     97 		mutouch penmount spaceorb summa wacom void \
     98 		magellan hyperpen jamstudio fpit palmax
     99 
    100 CPPFLAGS.xf86Init.c+=		-DOSNAME='"NetBSD/${MACHINE} ${OS_RELEASE} -"' \
    101 				-DOSVENDOR='"The NetBSD Foundation, Inc."' \
    102 				-DDEFAULT_MODULE_PATH='"${X11USRLIBDIR}/modules"' \
    103 				-DDEFAULT_LIBRARY_PATH='"${X11USRLIBDIR}"'
    104 CPPFLAGS.xf86Globals.c=		-DDEFAULT_MODULE_PATH='"${X11USRLIBDIR}/modules"'
    105 CPPFLAGS.xf86Configure.c=	-DXF86CONFIGFILE='"xorg.conf"'
    106 CPPFLAGS.xf86Config.c=		-DDRIVERS='"${DRIVERS}"' \
    107 				-DIDRIVERS='"${IDRIVERS}"' \
    108 				-DPROJECTROOT='"${X11ROOTDIR}"'
    109 CPPFLAGS.xf86AutoConfig.c=	-DPROJECTROOT='"${X11ROOTDIR}"' \
    110 				-DBINDIR='"${X11BINDIR}"' \
    111 				-DDRIVERS='"${DRIVERS}"' \
    112 				-DIDRIVERS='"${IDRIVERS}"'
    113 
    114 COPTS.xf86sbusBus.c=		-Wno-error=incompatible-pointer-types
    115 COPTS.xf86Configure.c=		${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :}
    116 
    117 COPTS.xf86pciBus.c=		${${ACTIVE_CC} == "clang":? -Wno-error=tautological-constant-out-of-range-compare :}
    118 
    119 .include <bsd.x11.mk>
    120 .include <bsd.lib.mk>
    121