1# $NetBSD: Makefile,v 1.38 2015/09/30 22:58:02 rjs 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" 21.if !defined(__MINIX) 22SRCS.bsd+= bsd_apm.c 23.else 24SRCS.bsd+= pm_noop.c 25.endif # !defined(__MINIX) 26.endif 27.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 28.if !defined(__MINIX) 29SRCS.bsd+= i386_video.c lnx_agp.c 30.else 31SRCS.bsd+= i386_video.c agp_noop.c 32.endif # !defined(__MINIX) 33.for _FN in ${SRCS.bsd} 34.if !defined(__MINIX) 35.if ${MACHINE_ARCH} == "i386" 36CPPFLAGS.${_FN}+= -DPCCONS_SUPPORT -DHAS_APERTURE_DRV 37.endif 38CPPFLAGS.${_FN}+= -DUSE_I386_IOPL -DPCVT_SUPPORT -DWSCONS_SUPPORT \ 39 -DUSESTDRES -DHAVE_SYSV_IPC \ 40 -DHAS_MTRR_BUILTIN 41.else 42CPPFLAGS.${_FN}= -DUSESTDRES -DHAVE_SYSV_IPC 43.endif # !defined(__MINIX) 44.endfor 45.endif 46 47.if ${MACHINE} == "macppc" || ${MACHINE} == "prep" || ${MACHINE} == "bebox" || ${MACHINE} == "ofppc" 48SRCS.bsd+= ppc_video.c pm_noop.c lnx_agp.c 49.for _FN in ${SRCS.bsd} 50CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 51.endfor 52.endif 53 54.if ${MACHINE_ARCH} == "alpha" 55SRCS.bsd+= alpha_video.c bsd_ev56.c pm_noop.c agp_noop.c 56.for _FN in ${SRCS.bsd} 57CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC -DUSE_ALPHA_PIO 58.endfor 59.endif 60 61.if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64" 62SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 63SRCS.bus+= netbsdSbus.c 64.for _FN in ${SRCS.bsd} 65CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 66.endfor 67.endif 68 69.if ${MACHINE} == "ews4800mips" || \ 70 ${MACHINE} == "hpcmips" || \ 71 ${MACHINE} == "newsmips" || \ 72 ${MACHINE} == "sgimips" || \ 73 ${MACHINE} == "evbmips" 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} == "cats" || \ 81 ${MACHINE} == "evbarm" || \ 82 ${MACHINE} == "hpcarm" || \ 83 ${MACHINE} == "shark" || \ 84 ${MACHINE} == "netwinder" || \ 85 ${MACHINE} == "zaurus" 86SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 87.for _FN in ${SRCS.bsd} 88.if !defined(__MINIX) 89CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 90.else 91CPPFLAGS.${_FN}= -DUSESTDRES -DHAVE_SYSV_IPC 92.endif # !defined(__MINIX) 93.endfor 94.endif 95 96.if ${MACHINE} == "shark" 97CPPFLAGS.ppc_video.c += -DPCI_MAGIC_IO_RANGE=0xf0000000 98.endif 99 100.if ${MACHINE} == "dreamcast" || \ 101 ${MACHINE} == "hpcsh" 102SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 103.for _FN in ${SRCS.bsd} 104CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 105.endfor 106.endif 107 108.if ${MACHINE} == "hp300" || \ 109 ${MACHINE} == "luna68k" || \ 110 ${MACHINE} == "mac68k" 111SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 112.for _FN in ${SRCS.bsd} 113CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 114.endfor 115.endif 116 117.if ${MACHINE} == "vax" 118SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c 119.for _FN in ${SRCS.bsd} 120CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC 121.endfor 122.endif 123 124# some platforms will probably need ioperm_noop.c 125 126.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bus 127SRCS.bus+= Pci.c 128 129.if ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \ 130 ${MACHINE} == "sgimips" || ${MACHINE} == "shark" || \ 131 ${MACHINE} == "netwinder" || ${MACHINE_ARCH} == "sparc" || \ 132 ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "alpha" || \ 133 ${MACHINE} == "prep" || ${MACHINE} == "bebox" || ${MACHINE} == "ofppc" 134#SRCS.bus+= netbsdPci.c 135.endif 136 137.if ${MACHINE} == "sparc" || ${MACHINE} == "sparc64" || \ 138 ${MACHINE_ARCH} == "powerpc" || ${MACHINE} == "netwinder" 139#CPPFLAGS.netbsdPci.c+= -DPCI_VIA_TTYE0 140.endif 141 142# XXX .S not built from automake either 143.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 144#SRCS.misc+= CBUSmemcpy.c CIODelay.c CSlowBcopy.c 145#CPPFLAGS.BUSmemcpy.S= -DUSE_GAS 146#CPPFLAGS.IODelay.S= -DUSE_GAS 147#CPPFLAGS.SlowBcopy.S= -DUSE_GAS 148.endif 149 150.if ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \ 151 ${MACHINE} == "sgimips" || ${MACHINE_ARCH} == "sparc64" || \ 152 ${MACHINE_ARCH} == "sparc" || ${MACHINE} == "netwinder" || \ 153 ${MACHINE} == "shark" || ${MACHINE} == "ofppc" || \ 154 ${MACHINE_ARCH} == "alpha" || ${MACHINE} == "prep" || \ 155 ${MACHINE} == "bebox" 156#SRCS.misc+= CBUSmemcpy.c CIODelay.c CSlowBcopy.c 157.endif 158 159.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/os-support/misc 160SRCS.misc+= SlowBcopy.c 161 162# XXX namespace collision so avoid it, only has to be done for non-i386. 163#BUILDSYMLINKS= BUSmemcpy.c CBUSmemcpy.c \ 164# IODelay.c CIODelay.c \ 165# SlowBcopy.c CSlowBcopy.c 166 167SRCS= ${SRCS.bsd} ${SRCS.bus} ${SRCS.misc} xorgos.c 168 169CPPFLAGS+= -I${X11SRCDIR.xorg-server}/hw/xfree86/common \ 170 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support \ 171 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bsd \ 172 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/bus \ 173 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/misc \ 174 -I${X11SRCDIR.xorg-server}/include \ 175 -I${DESTDIR}${X11INCDIR}/X11 \ 176 -I${DESTDIR}${X11INCDIR}/X11/extensions \ 177 -I${DESTDIR}${X11INCDIR}/pixman-1 \ 178 -I${X11SRCDIR.xorg-server}/mi \ 179 -I${X11SRCDIR.xorg-server}/Xext \ 180 -I${X11SRCDIR.xorg-server}/hw/xfree86/os-support/shared 181.if ${X11DRI} != "no" 182CPPFLAGS+= ${X11FLAGS.DRI} 183.endif 184 185.include <bsd.x11.mk> 186.include <bsd.lib.mk> 187