1# $NetBSD: Makefile,v 1.20 2008/10/03 05:14:01 macallan Exp $ 2 3.include "../../../Makefile.serverlib" 4 5LIB= xf86_os 6 7.PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support 8.PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/bsd 9.PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/shared 10SRCS.bsd= bsd_init.c bsd_io.c bsd_VTsw.c libc_wrapper.c std_kbdEv.c \ 11 posix_tty.c bsd_mouse.c stdPci.c vidmem.c sigio.c \ 12 kmod_noop.c bsd_kbd.c bsd_KbdMap.c at_scancode.c 13 14.PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/linux 15.if ${MACHINE_ARCH} == "x86_64" 16SRCS.bsd+= pm_noop.c 17.endif 18.if ${MACHINE_ARCH} == "i386" 19SRCS.bsd+= bsd_apm.c 20.endif 21.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 22SRCS.bsd+= i386_video.c stdResource.c lnx_agp.c 23.for _FN in ${SRCS.bsd} 24.if ${MACHINE_ARCH} == "i386" 25CPPFLAGS.${_FN}+= -DPCCONS_SUPPORT -DHAS_APERTURE_DRV 26.endif 27CPPFLAGS.${_FN}+= -DPCVT_SUPPORT -DWSCONS_SUPPORT \ 28 -DUSESTDRES -DHAVE_SYSV_IPC \ 29 -DHAS_MTRR_BUILTIN -DUSE_I386_IOPL 30.endfor 31.endif 32 33.if ${MACHINE} == "macppc" || ${MACHINE} == "ofppc" 34SRCS.bsd+= ppc_video.c bsdResource.c pm_noop.c lnx_agp.c 35.for _FN in ${SRCS.bsd} 36CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC \ 37 -DUSE_PPC_MMAP 38.endfor 39.endif 40 41.if ${MACHINE} == "sgimips" 42SRCS.bsd+= mips_video.c bsdResource.c pm_noop.c lnx_agp.c 43.for _FN in ${SRCS.bsd} 44CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 45.endfor 46.endif 47 48.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc" 49SRCS.bsd+= sparc64_video.c bsdResource.c pm_noop.c lnx_agp.c \ 50 ioperm_noop.c netbsdSbus.c 51.for _FN in ${SRCS.bsd} 52CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 53.endfor 54.endif 55 56.if ${MACHINE} == "cats" 57SRCS.bsd+= arm_video.c bsdResource.c pm_noop.c agp_noop.c ioperm_noop.c 58.for _FN in ${SRCS.bsd} 59CPPFLAGS.${_FN}= -DPCVT_SUPPORT -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 60.endfor 61.endif 62 63.if ${MACHINE} == "netwinder" 64SRCS.bsd+= arm_video.c bsdResource.c pm_noop.c agp_noop.c ioperm_noop.c 65.for _FN in ${SRCS.bsd} 66CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 67.endfor 68.endif 69 70.if ${MACHINE} == "shark" 71SRCS.bsd+= ppc_video.c bsdResource.c pm_noop.c agp_noop.c 72.for _FN in ${SRCS.bsd} 73CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC -DUSE_PPC_MMAP 74.endfor 75.endif 76 77.PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/bus 78SRCS.bus= Pci.c 79 80.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 81SRCS.bus+= ix86Pci.c 82.endif 83 84.if ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \ 85 ${MACHINE} == "sgimips" || ${MACHINE_ARCH} == "sparc64" || \ 86 ${MACHINE_ARCH} == "sparc" || ${MACHINE} == "netwinder" || \ 87 ${MACHINE} == "shark" || ${MACHINE} == "ofppc" 88SRCS.bus+= netbsdPci.c 89.endif 90 91.if ${MACHINE} == "macppc" || ${MACHINE} == "ofppc" || \ 92 ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc" 93.for _FN in ${SRCS.bus} 94CPPFLAGS.${_FN}+= -DPCI_VIA_TTYE0 95.endfor 96.endif 97 98.PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/misc 99SRCS.misc= xf86_Util.c Delay.c xf86_IlHack.c 100 101.if ${MACHINE_ARCH} == "i386" 102SRCS.misc+= BUSmemcpy.S IODelay.S SlowBcopy.S 103CPPFLAGS.BUSmemcpy.S= -DUSE_GAS 104CPPFLAGS.IODelay.S= -DUSE_GAS 105CPPFLAGS.SlowBcopy.S= -DUSE_GAS 106.endif 107 108.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE} == "macppc" || \ 109 ${MACHINE} == "cats" || ${MACHINE} == "sgimips" || \ 110 ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc" || \ 111 ${MACHINE} == "netwinder" || ${MACHINE} == "shark" || \ 112 ${MACHINE} == "ofppc" 113SRCS.misc+= CBUSmemcpy.c CIODelay.c CSlowBcopy.c 114.endif 115 116# XXX namespace collision so avoid it, only has to be done for non-i386. 117BUILDSYMLINKS= BUSmemcpy.c CBUSmemcpy.c \ 118 IODelay.c CIODelay.c \ 119 SlowBcopy.c CSlowBcopy.c 120 121SRCS= ${SRCS.bsd} ${SRCS.bus} ${SRCS.misc} 122 123CPPFLAGS+= -I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/common \ 124 -I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support \ 125 -I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/bsd \ 126 -I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/bus \ 127 -I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/misc \ 128 -I${X11SRCDIR.xc}/programs/Xserver/include \ 129 -I${DESTDIR}${X11INCDIR}/X11 \ 130 -I${DESTDIR}${X11INCDIR}/X11/extensions \ 131 -I${X11SRCDIR.xc}/programs/Xserver/mi \ 132 -I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/shared \ 133 -I${XSERVERINCDIR} 134.if ${X11DRI} != "no" 135CPPFLAGS+= ${X11FLAGS.DRI} 136.endif 137 138.include <bsd.x11.mk> 139.include <bsd.lib.mk> 140