1srcs_xorg_os_support = [ 2 'bus/nobus.c', 3 'shared/posix_tty.c', 4 'shared/sigio.c', 5 'shared/vidmem.c', 6] 7 8hdrs_xorg_os_support = [ 9 'bus/xf86Pci.h', 10 'xf86_OSlib.h', 11 'xf86_OSproc.h' 12] 13 14os_support_flags = ['-DUSESTDRES'] 15 16if get_option('pciaccess') 17 srcs_xorg_os_support += 'bus/Pci.c' 18 if host_machine.system() != 'linux' and host_machine.system() != 'solaris' 19 srcs_xorg_os_support += 'bus/bsd_pci.c' 20 endif 21 if host_machine.cpu() == 'sparc' 22 srcs_xorg_os_support += 'bus/Sbus.c' 23 install_data('bus/xf86Sbus.h', install_dir: xorgsdkdir) 24 endif 25endif 26 27if host_machine.system() == 'linux' 28 srcs_xorg_os_support += [ 29 'linux/lnx_agp.c', 30 'linux/lnx_bell.c', 31 'linux/lnx_init.c', 32 'linux/lnx_kmod.c', 33 'linux/lnx_platform.c', 34 'linux/lnx_video.c', 35 'misc/SlowBcopy.c', 36 'shared/VTsw_usl.c', 37 ] 38 if build_systemd_logind 39 srcs_xorg_os_support += 'linux/systemd-logind.c' 40 endif 41 42 # this is ugly because the code is also 43 if build_apm or build_acpi 44 srcs_xorg_os_support += 'linux/lnx_apm.c' 45 if build_acpi 46 srcs_xorg_os_support += 'linux/lnx_acpi.c' 47 endif 48 endif 49 50elif host_machine.system() == 'solaris' 51 srcs_xorg_os_support += [ 52 'solaris/sun_apm.c', 53 'solaris/sun_bell.c', 54 'solaris/sun_init.c', 55 'solaris/sun_vid.c', 56 'shared/kmod_noop.c', 57 ] 58 59 if cc.has_header('sys/vt.h') 60 srcs_xorg_os_support += 'solaris/sun_VTsw.c' 61 else 62 srcs_xorg_os_support += 'shared/VTsw_noop.c' 63 endif 64 65 if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h') 66 srcs_xorg_os_support += 'solaris/sun_agp.c' 67 else 68 srcs_xorg_os_support += 'shared/agp_noop.c' 69 endif 70 71 if host_machine.cpu_family() == 'sparc' 72 srcs_xorg_os_support += 'solaris/solaris-sparcv8plus.S' 73 elif host_machine.cpu_family() == 'x86_64' 74 srcs_xorg_os_support += 'solaris/solaris-amd64.S' 75 elif host_machine.cpu_family() == 'x86' 76 srcs_xorg_os_support += 'solaris/solaris-ia32.S' 77 else 78 error('Unknown CPU family for Solaris build') 79 endif 80 81elif host_machine.system().endswith('bsd') 82 srcs_xorg_os_support += [ 83 'bsd/bsd_VTsw.c', 84 'bsd/bsd_bell.c', 85 'bsd/bsd_init.c', 86 ] 87 88 # XXX: APM 89 90 if host_machine.cpu_family() == 'x86_64' 91 srcs_xorg_os_support += 'bsd/i386_video.c' 92 elif host_machine.cpu_family() == 'x86' 93 srcs_xorg_os_support += 'bsd/i386_video.c' 94 elif host_machine.cpu_family() == 'arm' 95 srcs_xorg_os_support += 'bsd/arm_video.c' 96 elif host_machine.cpu_family() == 'powerpc' 97 srcs_xorg_os_support += 'bsd/ppc_video.c' 98 elif host_machine.cpu_family() == 'sparc64' 99 srcs_xorg_os_support += 'bsd/sparc64_video.c' 100 srcs_xorg_os_support += 'shared/ioperm_noop.c' 101 elif host_machine.cpu_family() == 'alpha' 102 srcs_xorg_os_support += 'bsd/alpha_video.c' 103 endif 104 105 if host_machine.system() == 'freebsd' 106 srcs_xorg_os_support += 'bsd/bsd_kmod.c' 107 else 108 srcs_xorg_os_support += 'shared/kmod_noop.c' 109 endif 110 111 if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h') 112 srcs_xorg_os_support += 'linux/lnx_agp.c' 113 else 114 srcs_xorg_os_support += 'shared/agp_noop.c' 115 endif 116else 117 # stub ossupport 118 srcs_xorg_os_support += [ 119 'shared/VTsw_noop.c', 120 'shared/agp_noop.c', 121 'shared/ioperm_noop.c', 122 'shared/kmod_noop.c', 123 'shared/pm_noop.c', 124 'shared/vidmem.c', 125 'shared/posix_tty.c', 126 'shared/sigio.c', 127 'stub/stub_bell.c', 128 'stub/stub_init.c', 129 'stub/stub_video.c', 130 ] 131endif 132 133xorg_os_support = static_library('xorg_os_support', 134 srcs_xorg_os_support, 135 include_directories: [inc, xorg_inc], 136 dependencies: [ 137 common_dep, 138 dbus_dep, 139 libdrm_dep, 140 ], 141 c_args: xorg_c_args, 142) 143 144install_data(hdrs_xorg_os_support, install_dir: xorgsdkdir) 145