1# $NetBSD: Makefile,v 1.2 2021/12/06 17:52:00 abs Exp $ 2 3.include "../../../Makefile.serverlib" 4.include "../../../Makefile.servermod" 5 6LIB= xorgos 7 8.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support 9.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bsd 10.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support/shared 11SRCS.bsd= \ 12 bsd_VTsw.c bsd_bell.c bsd_init.c bsd_pci.c \ 13 kmod_noop.c \ 14 posix_tty.c sigio.c vidmem.c 15 16.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support/linux 17.if ${MACHINE_ARCH} == "x86_64" 18SRCS.bsd+= pm_noop.c 19.endif 20.if ${MACHINE_ARCH} == "i386" 21SRCS.bsd+= bsd_apm.c 22.endif 23.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 24SRCS.bsd+= i386_video.c lnx_agp.c 25.for _FN in ${SRCS.bsd} 26.if ${MACHINE_ARCH} == "i386" 27CPPFLAGS.${_FN}+= -DPCCONS_SUPPORT -DHAS_APERTURE_DRV 28.endif 29CPPFLAGS.${_FN}+= -DUSE_I386_IOPL -DPCVT_SUPPORT -DWSCONS_SUPPORT \ 30 -DUSESTDRES -DHAVE_SYSV_IPC \ 31 -DHAS_MTRR_BUILTIN 32.endfor 33.endif 34 35.if ${MACHINE} == "macppc" || ${MACHINE} == "prep" || ${MACHINE} == "bebox" || ${MACHINE} == "ofppc" || ${MACHINE} == "ibmnws" 36SRCS.bsd+= ppc_video.c pm_noop.c lnx_agp.c 37.for _FN in ${SRCS.bsd} 38CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 39.endfor 40.endif 41 42.if ${MACHINE_ARCH} == "alpha" 43SRCS.bsd+= alpha_video.c bsd_ev56.c pm_noop.c agp_noop.c 44.for _FN in ${SRCS.bsd} 45CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC -DUSE_ALPHA_PIO 46.endfor 47.endif 48 49.if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64" 50SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 51SRCS.bus+= netbsdSbus.c 52.for _FN in ${SRCS.bsd} 53CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 54.endfor 55.endif 56 57.if ${MACHINE} == "ews4800mips" || \ 58 ${MACHINE} == "hpcmips" || \ 59 ${MACHINE} == "newsmips" || \ 60 ${MACHINE} == "sgimips" || \ 61 ${MACHINE} == "evbmips" 62SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 63.for _FN in ${SRCS.bsd} 64CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 65.endfor 66.endif 67 68.if ${MACHINE} == "cats" || \ 69 ${MACHINE} == "evbarm" || \ 70 ${MACHINE} == "hpcarm" || \ 71 ${MACHINE} == "shark" || \ 72 ${MACHINE} == "netwinder" || \ 73 ${MACHINE} == "zaurus" 74SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 75.for _FN in ${SRCS.bsd} 76CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 77.endfor 78.endif 79 80.if ${MACHINE} == "shark" 81CPPFLAGS.ppc_video.c += -DPCI_MAGIC_IO_RANGE=0xf0000000 82.endif 83 84.if ${MACHINE} == "dreamcast" || \ 85 ${MACHINE} == "hpcsh" 86SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 87.for _FN in ${SRCS.bsd} 88CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 89.endfor 90.endif 91 92.if ${MACHINE} == "amiga" || \ 93 ${MACHINE} == "hp300" || \ 94 ${MACHINE} == "luna68k" || \ 95 ${MACHINE} == "mac68k" 96SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 97.for _FN in ${SRCS.bsd} 98CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 99.endfor 100.endif 101 102.if ${MACHINE} == "pmax" || \ 103 ${MACHINE} == "vax" 104SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 105.for _FN in ${SRCS.bsd} 106CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 107.endfor 108.endif 109 110# some platforms will probably need ioperm_noop.c 111 112.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bus 113SRCS.bus+= Pci.c 114 115.if ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \ 116 ${MACHINE} == "sgimips" || ${MACHINE} == "shark" || \ 117 ${MACHINE} == "netwinder" || ${MACHINE_ARCH} == "sparc" || \ 118 ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "alpha" || \ 119 ${MACHINE} == "prep" || ${MACHINE} == "bebox" || \ 120 ${MACHINE} == "ofppc" || ${MACHINE} == "ibmnws" 121#SRCS.bus+= netbsdPci.c 122.endif 123 124.if ${MACHINE} == "sparc" || ${MACHINE} == "sparc64" || \ 125 ${MACHINE_ARCH} == "powerpc" || ${MACHINE} == "netwinder" 126#CPPFLAGS.netbsdPci.c+= -DPCI_VIA_TTYE0 127.endif 128 129# XXX .S not built from automake either 130.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 131#SRCS.misc+= CBUSmemcpy.c CIODelay.c CSlowBcopy.c 132#CPPFLAGS.BUSmemcpy.S= -DUSE_GAS 133#CPPFLAGS.IODelay.S= -DUSE_GAS 134#CPPFLAGS.SlowBcopy.S= -DUSE_GAS 135.endif 136 137.if ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \ 138 ${MACHINE} == "sgimips" || ${MACHINE_ARCH} == "sparc64" || \ 139 ${MACHINE_ARCH} == "sparc" || ${MACHINE} == "netwinder" || \ 140 ${MACHINE} == "shark" || ${MACHINE} == "ofppc" || \ 141 ${MACHINE_ARCH} == "alpha" || ${MACHINE} == "prep" || \ 142 ${MACHINE} == "bebox" || ${MACHINE} == "ibmnws" 143#SRCS.misc+= CBUSmemcpy.c CIODelay.c CSlowBcopy.c 144.endif 145 146.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support/misc 147SRCS.misc+= SlowBcopy.c 148 149# XXX namespace collision so avoid it, only has to be done for non-i386. 150#BUILDSYMLINKS= BUSmemcpy.c CBUSmemcpy.c \ 151# IODelay.c CIODelay.c \ 152# SlowBcopy.c CSlowBcopy.c 153 154SRCS= ${SRCS.bsd} ${SRCS.bus} ${SRCS.misc} xorgos.c 155 156CPPFLAGS+= -I${X11SRCDIR.xorg-server}/hw/xfree86/common \ 157 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support \ 158 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bsd \ 159 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bus \ 160 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/misc \ 161 -I${X11SRCDIR.xorg-server}/include \ 162 -I${DESTDIR}${X11INCDIR}/X11 \ 163 -I${DESTDIR}${X11INCDIR}/X11/extensions \ 164 -I${DESTDIR}${X11INCDIR}/pixman-1 \ 165 -I${X11SRCDIR.xorg-server}/mi \ 166 -I${X11SRCDIR.xorg-server}/Xext \ 167 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/shared 168.if ${X11DRI} != "no" 169CPPFLAGS+= ${X11FLAGS.DRI} 170.endif 171 172CWARNFLAGS.clang+= -Wno-error=empty-body 173 174.include <bsd.x11.mk> 175.include <bsd.lib.mk> 176