Fix up mix of man(7)/mdoc(7).
[netbsd-mini2440.git] / x11 / Xserver / hw / xfree86 / xf86_os / Makefile
blob3d5806cc9283c354b66a9fc8fda5f9838f6b6c56
1 # $NetBSD: Makefile,v 1.20 2008/10/03 05:14:01 macallan Exp $
3 .include "../../../Makefile.serverlib"
5 LIB= xf86_os
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
10 SRCS.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
14 .PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/linux
15 .if ${MACHINE_ARCH} == "x86_64"
16 SRCS.bsd+= pm_noop.c
17 .endif
18 .if ${MACHINE_ARCH} == "i386"
19 SRCS.bsd+= bsd_apm.c
20 .endif
21 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
22 SRCS.bsd+= i386_video.c stdResource.c lnx_agp.c
23 .for _FN in ${SRCS.bsd}
24 .if ${MACHINE_ARCH} == "i386"
25 CPPFLAGS.${_FN}+= -DPCCONS_SUPPORT -DHAS_APERTURE_DRV
26 .endif
27 CPPFLAGS.${_FN}+= -DPCVT_SUPPORT -DWSCONS_SUPPORT \
28 -DUSESTDRES -DHAVE_SYSV_IPC \
29 -DHAS_MTRR_BUILTIN -DUSE_I386_IOPL
30 .endfor
31 .endif
33 .if ${MACHINE} == "macppc" || ${MACHINE} == "ofppc"
34 SRCS.bsd+= ppc_video.c bsdResource.c pm_noop.c lnx_agp.c
35 .for _FN in ${SRCS.bsd}
36 CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC \
37 -DUSE_PPC_MMAP
38 .endfor
39 .endif
41 .if ${MACHINE} == "sgimips"
42 SRCS.bsd+= mips_video.c bsdResource.c pm_noop.c lnx_agp.c
43 .for _FN in ${SRCS.bsd}
44 CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
45 .endfor
46 .endif
48 .if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc"
49 SRCS.bsd+= sparc64_video.c bsdResource.c pm_noop.c lnx_agp.c \
50 ioperm_noop.c netbsdSbus.c
51 .for _FN in ${SRCS.bsd}
52 CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
53 .endfor
54 .endif
56 .if ${MACHINE} == "cats"
57 SRCS.bsd+= arm_video.c bsdResource.c pm_noop.c agp_noop.c ioperm_noop.c
58 .for _FN in ${SRCS.bsd}
59 CPPFLAGS.${_FN}= -DPCVT_SUPPORT -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
60 .endfor
61 .endif
63 .if ${MACHINE} == "netwinder"
64 SRCS.bsd+= arm_video.c bsdResource.c pm_noop.c agp_noop.c ioperm_noop.c
65 .for _FN in ${SRCS.bsd}
66 CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
67 .endfor
68 .endif
70 .if ${MACHINE} == "shark"
71 SRCS.bsd+= ppc_video.c bsdResource.c pm_noop.c agp_noop.c
72 .for _FN in ${SRCS.bsd}
73 CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC -DUSE_PPC_MMAP
74 .endfor
75 .endif
77 .PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/bus
78 SRCS.bus= Pci.c
80 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
81 SRCS.bus+= ix86Pci.c
82 .endif
84 .if ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \
85 ${MACHINE} == "sgimips" || ${MACHINE_ARCH} == "sparc64" || \
86 ${MACHINE_ARCH} == "sparc" || ${MACHINE} == "netwinder" || \
87 ${MACHINE} == "shark" || ${MACHINE} == "ofppc"
88 SRCS.bus+= netbsdPci.c
89 .endif
91 .if ${MACHINE} == "macppc" || ${MACHINE} == "ofppc" || \
92 ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc"
93 .for _FN in ${SRCS.bus}
94 CPPFLAGS.${_FN}+= -DPCI_VIA_TTYE0
95 .endfor
96 .endif
98 .PATH: ${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/os-support/misc
99 SRCS.misc= xf86_Util.c Delay.c xf86_IlHack.c
101 .if ${MACHINE_ARCH} == "i386"
102 SRCS.misc+= BUSmemcpy.S IODelay.S SlowBcopy.S
103 CPPFLAGS.BUSmemcpy.S= -DUSE_GAS
104 CPPFLAGS.IODelay.S= -DUSE_GAS
105 CPPFLAGS.SlowBcopy.S= -DUSE_GAS
106 .endif
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"
113 SRCS.misc+= CBUSmemcpy.c CIODelay.c CSlowBcopy.c
114 .endif
116 # XXX namespace collision so avoid it, only has to be done for non-i386.
117 BUILDSYMLINKS= BUSmemcpy.c CBUSmemcpy.c \
118 IODelay.c CIODelay.c \
119 SlowBcopy.c CSlowBcopy.c
121 SRCS= ${SRCS.bsd} ${SRCS.bus} ${SRCS.misc}
123 CPPFLAGS+= -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"
135 CPPFLAGS+= ${X11FLAGS.DRI}
136 .endif
138 .include <bsd.x11.mk>
139 .include <bsd.lib.mk>