1xorg_inc = include_directories( 2 'common', 3 'ddc', 4 'dri2', 5 'i2c', 6 'int10', 7 'loader', 8 'modes', 9 'os-support', 10 'os-support/bus', 11 'parser', 12 'ramdac', 13 'vbe', 14 'vgahw', 15) 16 17xorg_c_args = [] 18xorg_c_args += '-DHAVE_XORG_CONFIG_H' 19xorg_c_args += '-DXORG_NO_SDKSYMS' 20 21pciaccess_dep = [] 22if get_option('pciaccess') 23 pciaccess_dep = dependency('pciaccess', version: '>= 0.12.901') 24endif 25 26# subdirs for convenience libraries statically linked into Xorg 27subdir('common') 28subdir('ddc') 29if build_dri1 30 subdir('dri') 31endif 32if build_dri2 33 subdir('dri2') 34endif 35subdir('i2c') 36subdir('loader') 37subdir('modes') 38subdir('os-support') 39subdir('parser') 40subdir('ramdac') 41subdir('xkb') 42 43srcs_xorg = [ 44 '../../mi/miinitext.c' 45] 46 47# Extract all the objects so that all symbols get brought into the 48# server. This prevents us from needing a global table of all symbols 49# that should be exported to Xorg modules, at the expense of all 50# symbols being included and public 51 52xorg_link = [ 53 libxserver, 54 libglxvnd, 55 xorg_common, 56 xorg_loader, 57 xorg_ddc, 58 xorg_xkb, 59 xorg_i2c, 60 xorg_modes, 61 xorg_os_support, 62 xorg_parser, 63 xorg_ramdac, 64 libxserver_xext_vidmode, 65 libxserver_main, 66 libxserver_config, 67] 68if build_dri1 69 xorg_link += xorg_dri 70endif 71if build_dri2 72 xorg_link += xorg_dri2 73endif 74 75if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' 76 linker_export_flags = '-Wl,--export-all-symbols' 77else 78 linker_export_flags = '-Wl,--export-dynamic' 79endif 80 81xorg_deps = [ 82 pixman_dep, 83 m_dep, 84 dl_dep, 85 pciaccess_dep, 86 sha1_dep, 87 dependency('xau'), 88 xdmcp_dep, 89 xfont2_dep, 90 xshmfence_dep, 91 config_dep, 92 libdrm_dep, 93] 94 95if get_option('suid_wrapper') 96 xorg_install_dir = get_option('libexecdir') 97else 98 xorg_install_dir = get_option('bindir') 99endif 100 101e = executable( 102 'Xorg', 103 srcs_xorg, 104 include_directories: [inc, xorg_inc], 105 link_whole: xorg_link, 106 dependencies: xorg_deps, 107 link_args: linker_export_flags, 108 c_args: xorg_c_args, 109 install: true, 110 install_dir: xorg_install_dir, 111 implib: true, 112) 113 114# subdirs for modules loadable by Xorg 115subdir('dixmods') 116subdir('exa') 117subdir('fbdevhw') 118if gbm_dep.found() 119 subdir('glamor_egl') 120endif 121if int10 != 'false' 122 if int10 == 'x86emu' 123 subdir('x86emu') 124 endif 125 subdir('int10') 126endif 127subdir('shadowfb') 128if build_vbe 129 subdir('vbe') 130endif 131if build_vgahw 132 subdir('vgahw') 133endif 134if build_modesetting 135 subdir('drivers/modesetting') 136endif 137 138if get_option('suid_wrapper') 139 executable('Xorg.wrap', 140 'xorg-wrapper.c', 141 include_directories: [inc, xorg_inc], 142 dependencies: xorg_deps, 143 c_args: xorg_c_args, 144 install: true, 145 install_dir: get_option('libexecdir'), 146 # install_mode: ['r-sr-xr-x', 0, 0], 147 ) 148 configure_file( 149 input: 'Xorg.sh.in', 150 output: 'Xorg', 151 configuration: conf_data, 152 install_dir: join_paths(get_option('prefix'), get_option('bindir')), 153 ) 154endif 155 156executable('cvt', 157 ['utils/cvt/cvt.c', 'modes/xf86cvt.c'], 158 include_directories: [inc, xorg_inc], 159 dependencies: xorg_deps, 160 link_with: libxserver_os, 161 c_args: xorg_c_args, 162 install: true, 163) 164 165executable('gtf', 166 'utils/gtf/gtf.c', 167 include_directories: [inc, xorg_inc], 168 dependencies: xorg_deps, 169 c_args: xorg_c_args, 170 install: true, 171) 172 173# For symbol presence testing only 174xorgserver_lib = shared_library( 175 'xorgserver', 176 srcs_xorg, 177 include_directories: [inc, xorg_inc], 178 link_whole: xorg_link, 179 dependencies: xorg_deps, 180 link_args: linker_export_flags, 181 c_args: xorg_c_args, 182 install: false, 183) 184 185xorgserver_dep = declare_dependency(link_with: xorgserver_lib) 186 187install_man(configure_file( 188 input: 'man/Xorg.man', 189 output: 'Xorg.1', 190 configuration: manpage_config, 191)) 192 193if get_option('suid_wrapper') 194 install_man(configure_file( 195 input: 'man/Xorg.wrap.man', 196 output: 'Xorg.wrap.1', 197 configuration: manpage_config, 198 )) 199 200 install_man(configure_file( 201 input: 'man/Xwrapper.config.man', 202 output: 'Xwrapper.config.5', 203 configuration: manpage_config, 204 )) 205endif 206 207install_man(configure_file( 208 input: 'man/xorg.conf.man', 209 output: 'xorg.conf.5', 210 configuration: manpage_config, 211)) 212 213install_man(configure_file( 214 input: 'man/xorg.conf.d.man', 215 output: 'xorg.conf.d.5', 216 configuration: manpage_config, 217)) 218 219install_man(configure_file( 220 input: 'utils/man/cvt.man', 221 output: 'cvt.1', 222 configuration: manpage_config, 223)) 224 225install_man(configure_file( 226 input: 'utils/man/gtf.man', 227 output: 'gtf.1', 228 configuration: manpage_config, 229)) 230