On Wed, Apr 05, 2017 at 04:49:39AM +0500, Mihail Konev wrote:
> v2 (Emil Velikov):
>   2/7: Figure out what exactly happens.
>   3/7: Add missing ifdef.
>   5/7: Move DESTDIR to configure.
>        Add missing Cc.
>   1-5/7: Reword.
> 
> The 7/7 has also been suggested to use "ln -s".
> Kept unchanged since:
> 
> - It is simpler than 
> https://lists.x.org/archives/xorg-devel/2017-February/052761.html
>   No need to SUFFIXES, CLEANFILES, or -include in every makefile.
> 
> - Compiler errors are acceptable:
> 
>     CC       posix_tty.include.lo
>   In file included from posix_tty.include.c:1:0:
>   ../shared/posix_tty.c: In function `GetBaud':
>   ../shared/posix_tty.c:110:9: error: `rturn' undeclared (first use in this 
> function)
>            rturn B460800;
>            ^
>   ../shared/posix_tty.c:110:9: note: each undeclared identifier is reported 
> only once for each function it appears in
>   In file included from /usr/include/termios.h:39:0,
>                    from ../../../../hw/xfree86/os-support/xf86_OSlib.h:186,
>                    from ../shared/posix_tty.c:63,
>                    from posix_tty.include.c:1:
>   ../shared/posix_tty.c:110:15: error: expected `;' before numeric constant
>            rturn B460800;
>                  ^
>   Makefile:670: recipe for target 'posix_tty.include.lo' failed
>   make: *** [posix_tty.include.lo] Error 1
> 

The missing part:

- Rebuilding the .include.c file when the original changes is taken care
  of by Automake (Dependecy Tracking).

  Symlinks could be used (both variants attached), but then:
  * If symlinks have the ".include.c" extension, it inappropriately goes also 
into error/warning messages.
  * If symlinks have the ".c" extension, they are not obvious in makefiles.

> Mihail Konev (7):
>   configure.ac: only stub sdksyms.dep as needed
>   sdksyms: fix typo in export keyword index
>   hw/xfree86: add suid wrapper to uninstall target
>   configure.ac: add missing xquartz destdir
>   hw/xquartz: fix path to pseudoramiX headers
>   os-support/solaris: add asm to gitignore
>   configure.ac: use automake option subdir-objects
> 
>  .gitignore                                        |  1 +
>  configure.ac                                      | 10 ++++++----
>  hw/dmx/Makefile.am                                |  4 ++--
>  hw/dmx/config/Makefile.am                         |  4 ++--
>  hw/dmx/config/dmxlog.include.c                    |  1 +
>  hw/dmx/config/strlcpy.include.c                   |  1 +
>  hw/dmx/miinitext.include.c                        |  1 +
>  hw/dmx/panoramiX.include.c                        |  1 +
>  hw/kdrive/src/Makefile.am                         |  2 +-
>  hw/kdrive/src/miinitext.include.c                 |  1 +
>  hw/vfb/Makefile.am                                |  2 +-
>  hw/vfb/miinitext.include.c                        |  1 +
>  hw/xfree86/Makefile.am                            |  3 +++
>  hw/xfree86/dixmods/Makefile.am                    |  2 +-
>  hw/xfree86/dixmods/miinitext.include.c            |  1 +
>  hw/xfree86/glamor_egl/Makefile.am                 |  4 ++--
>  hw/xfree86/glamor_egl/glamor_egl.include.c        |  1 +
>  hw/xfree86/glamor_egl/glamor_eglmodule.include.c  |  1 +
>  hw/xfree86/int10/Makefile.am                      |  4 ++--
>  hw/xfree86/int10/linux.include.c                  |  1 +
>  hw/xfree86/int10/linux_vm86.include.c             |  1 +
>  hw/xfree86/os-support/Makefile.am                 | 14 +++++++++++++-
>  hw/xfree86/os-support/bsd/Makefile.am             | 20 ++++++++++----------
>  hw/xfree86/os-support/bsd/agp_noop.include.c      |  1 +
>  hw/xfree86/os-support/bsd/ioperm_noop.include.c   |  1 +
>  hw/xfree86/os-support/bsd/kmod_noop.include.c     |  1 +
>  hw/xfree86/os-support/bsd/lnx_agp.include.c       |  1 +
>  hw/xfree86/os-support/bsd/pm_noop.include.c       |  1 +
>  hw/xfree86/os-support/bsd/posix_tty.include.c     |  1 +
>  hw/xfree86/os-support/bsd/sigio.include.c         |  1 +
>  hw/xfree86/os-support/bsd/vidmem.include.c        |  1 +
>  hw/xfree86/os-support/hurd/Makefile.am            | 14 +++++++-------
>  hw/xfree86/os-support/hurd/VTsw_noop.include.c    |  1 +
>  hw/xfree86/os-support/hurd/agp_noop.include.c     |  1 +
>  hw/xfree86/os-support/hurd/kmod_noop.include.c    |  1 +
>  hw/xfree86/os-support/hurd/pm_noop.include.c      |  1 +
>  hw/xfree86/os-support/hurd/posix_tty.include.c    |  1 +
>  hw/xfree86/os-support/hurd/sigiostubs.include.c   |  1 +
>  hw/xfree86/os-support/hurd/vidmem.include.c       |  1 +
>  hw/xfree86/os-support/linux/Makefile.am           |  8 ++++----
>  hw/xfree86/os-support/linux/VTsw_usl.include.c    |  1 +
>  hw/xfree86/os-support/linux/posix_tty.include.c   |  1 +
>  hw/xfree86/os-support/linux/sigio.include.c       |  1 +
>  hw/xfree86/os-support/linux/vidmem.include.c      |  1 +
>  hw/xfree86/os-support/solaris/.gitignore          |  1 +
>  hw/xfree86/os-support/solaris/Makefile.am         | 12 ++++++------
>  hw/xfree86/os-support/solaris/VTsw_noop.include.c |  1 +
>  hw/xfree86/os-support/solaris/agp_noop.include.c  |  1 +
>  hw/xfree86/os-support/solaris/kmod_noop.include.c |  1 +
>  hw/xfree86/os-support/solaris/posix_tty.include.c |  1 +
>  hw/xfree86/os-support/solaris/sigio.include.c     |  1 +
>  hw/xfree86/os-support/solaris/vidmem.include.c    |  1 +
>  hw/xfree86/os-support/stub/Makefile.am            | 16 ++++++++--------
>  hw/xfree86/os-support/stub/VTsw_noop.include.c    |  1 +
>  hw/xfree86/os-support/stub/agp_noop.include.c     |  1 +
>  hw/xfree86/os-support/stub/ioperm_noop.include.c  |  1 +
>  hw/xfree86/os-support/stub/kmod_noop.include.c    |  1 +
>  hw/xfree86/os-support/stub/pm_noop.include.c      |  1 +
>  hw/xfree86/os-support/stub/posix_tty.include.c    |  1 +
>  hw/xfree86/os-support/stub/sigio.include.c        |  1 +
>  hw/xfree86/os-support/stub/vidmem.include.c       |  1 +
>  hw/xfree86/sdksyms.sh                             |  2 +-
>  hw/xfree86/utils/cvt/Makefile.am                  |  4 ++--
>  hw/xfree86/utils/cvt/xf86cvt.include.c            |  1 +
>  hw/xfree86/utils/cvt/xprintf.include.c            |  1 +
>  hw/xnest/Makefile.am                              |  2 +-
>  hw/xnest/miinitext.include.c                      |  1 +
>  hw/xquartz/Makefile.am                            |  4 ++--
>  hw/xquartz/bundle/Makefile.am                     |  8 ++++----
>  hw/xquartz/mach-startup/Makefile.am               |  4 ++--
>  hw/xquartz/mach-startup/strndup.include.c         |  1 +
>  hw/xquartz/miinitext.include.c                    |  1 +
>  hw/xquartz/xpr/Makefile.am                        |  2 +-
>  hw/xwayland/Makefile.am                           |  6 +++---
>  hw/xwayland/dpmsstubs.include.c                   |  1 +
>  hw/xwayland/miinitext.include.c                   |  1 +
>  hw/xwayland/stubs.include.c                       |  1 +
>  hw/xwin/Makefile.am                               |  2 +-
>  hw/xwin/miinitext.include.c                       |  1 +
>  test/miinitext.include.c                          |  1 +
>  80 files changed, 141 insertions(+), 68 deletions(-)
>  create mode 100644 hw/dmx/config/dmxlog.include.c
>  create mode 100644 hw/dmx/config/strlcpy.include.c
>  create mode 100644 hw/dmx/miinitext.include.c
>  create mode 100644 hw/dmx/panoramiX.include.c
>  create mode 100644 hw/kdrive/src/miinitext.include.c
>  create mode 100644 hw/vfb/miinitext.include.c
>  create mode 100644 hw/xfree86/dixmods/miinitext.include.c
>  create mode 100644 hw/xfree86/glamor_egl/glamor_egl.include.c
>  create mode 100644 hw/xfree86/glamor_egl/glamor_eglmodule.include.c
>  create mode 100644 hw/xfree86/int10/linux.include.c
>  create mode 100644 hw/xfree86/int10/linux_vm86.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/agp_noop.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/ioperm_noop.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/kmod_noop.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/lnx_agp.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/pm_noop.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/posix_tty.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/sigio.include.c
>  create mode 100644 hw/xfree86/os-support/bsd/vidmem.include.c
>  create mode 100644 hw/xfree86/os-support/hurd/VTsw_noop.include.c
>  create mode 100644 hw/xfree86/os-support/hurd/agp_noop.include.c
>  create mode 100644 hw/xfree86/os-support/hurd/kmod_noop.include.c
>  create mode 100644 hw/xfree86/os-support/hurd/pm_noop.include.c
>  create mode 100644 hw/xfree86/os-support/hurd/posix_tty.include.c
>  create mode 100644 hw/xfree86/os-support/hurd/sigiostubs.include.c
>  create mode 100644 hw/xfree86/os-support/hurd/vidmem.include.c
>  create mode 100644 hw/xfree86/os-support/linux/VTsw_usl.include.c
>  create mode 100644 hw/xfree86/os-support/linux/posix_tty.include.c
>  create mode 100644 hw/xfree86/os-support/linux/sigio.include.c
>  create mode 100644 hw/xfree86/os-support/linux/vidmem.include.c
>  create mode 100644 hw/xfree86/os-support/solaris/.gitignore
>  create mode 100644 hw/xfree86/os-support/solaris/VTsw_noop.include.c
>  create mode 100644 hw/xfree86/os-support/solaris/agp_noop.include.c
>  create mode 100644 hw/xfree86/os-support/solaris/kmod_noop.include.c
>  create mode 100644 hw/xfree86/os-support/solaris/posix_tty.include.c
>  create mode 100644 hw/xfree86/os-support/solaris/sigio.include.c
>  create mode 100644 hw/xfree86/os-support/solaris/vidmem.include.c
>  create mode 100644 hw/xfree86/os-support/stub/VTsw_noop.include.c
>  create mode 100644 hw/xfree86/os-support/stub/agp_noop.include.c
>  create mode 100644 hw/xfree86/os-support/stub/ioperm_noop.include.c
>  create mode 100644 hw/xfree86/os-support/stub/kmod_noop.include.c
>  create mode 100644 hw/xfree86/os-support/stub/pm_noop.include.c
>  create mode 100644 hw/xfree86/os-support/stub/posix_tty.include.c
>  create mode 100644 hw/xfree86/os-support/stub/sigio.include.c
>  create mode 100644 hw/xfree86/os-support/stub/vidmem.include.c
>  create mode 100644 hw/xfree86/utils/cvt/xf86cvt.include.c
>  create mode 100644 hw/xfree86/utils/cvt/xprintf.include.c
>  create mode 100644 hw/xnest/miinitext.include.c
>  create mode 100644 hw/xquartz/mach-startup/strndup.include.c
>  create mode 100644 hw/xquartz/miinitext.include.c
>  create mode 100644 hw/xwayland/dpmsstubs.include.c
>  create mode 100644 hw/xwayland/miinitext.include.c
>  create mode 100644 hw/xwayland/stubs.include.c
>  create mode 100644 hw/xwin/miinitext.include.c
>  create mode 100644 test/miinitext.include.c
> 
> -- 
> 2.9.2
> 
Mihail
>From 0e4c9bf2bef1ac4efdc6167acd6129ae144e563c Mon Sep 17 00:00:00 2001
From: Mihail Konev <[email protected]>
Date: Thu, 16 Feb 2017 22:14:45 +0500
Subject: [PATCH xserver] configure.ac: use automake option subdir-objects

Both fixes "source file is in a subdirectory" autoreconf warnings and
ensures automake 2.0 (future) compatibility.

Symlinked sources are so that every dir has its own file, and therefore,
does not reuse compilation results of another (objects are now put where
the source is, not the makefile), thus retaining the CFLAGS and other
settings as before.

Explicitly distribute hw/xfree86/os-support/shared/, as other dirs
now wouldn't do that implicitly by referencing source files from it.

Signed-off-by: Mihail Konev <[email protected]>
---
 .gitignore                                |  1 +
 configure.ac                              |  2 +-
 hw/dmx/Makefile.am                        |  4 ++--
 hw/dmx/config/Makefile.am                 |  4 ++--
 hw/dmx/config/dmxlog.c                    |  1 +
 hw/dmx/config/strlcpy.c                   |  1 +
 hw/dmx/miinitext.c                        |  1 +
 hw/dmx/panoramiX.c                        |  1 +
 hw/kdrive/src/Makefile.am                 |  2 +-
 hw/kdrive/src/miinitext.c                 |  1 +
 hw/vfb/Makefile.am                        |  2 +-
 hw/vfb/miinitext.c                        |  1 +
 hw/xfree86/dixmods/Makefile.am            |  2 +-
 hw/xfree86/dixmods/miinitext.c            |  1 +
 hw/xfree86/glamor_egl/Makefile.am         |  4 ++--
 hw/xfree86/glamor_egl/glamor_egl.c        |  1 +
 hw/xfree86/glamor_egl/glamor_eglmodule.c  |  1 +
 hw/xfree86/int10/Makefile.am              |  4 ++--
 hw/xfree86/int10/linux.c                  |  1 +
 hw/xfree86/int10/linux_vm86.c             |  1 +
 hw/xfree86/os-support/Makefile.am         | 14 +++++++++++++-
 hw/xfree86/os-support/bsd/Makefile.am     | 20 ++++++++++----------
 hw/xfree86/os-support/bsd/agp_noop.c      |  1 +
 hw/xfree86/os-support/bsd/ioperm_noop.c   |  1 +
 hw/xfree86/os-support/bsd/kmod_noop.c     |  1 +
 hw/xfree86/os-support/bsd/lnx_agp.c       |  1 +
 hw/xfree86/os-support/bsd/pm_noop.c       |  1 +
 hw/xfree86/os-support/bsd/posix_tty.c     |  1 +
 hw/xfree86/os-support/bsd/sigio.c         |  1 +
 hw/xfree86/os-support/bsd/vidmem.c        |  1 +
 hw/xfree86/os-support/hurd/Makefile.am    | 14 +++++++-------
 hw/xfree86/os-support/hurd/VTsw_noop.c    |  1 +
 hw/xfree86/os-support/hurd/agp_noop.c     |  1 +
 hw/xfree86/os-support/hurd/kmod_noop.c    |  1 +
 hw/xfree86/os-support/hurd/pm_noop.c      |  1 +
 hw/xfree86/os-support/hurd/posix_tty.c    |  1 +
 hw/xfree86/os-support/hurd/sigiostubs.c   |  1 +
 hw/xfree86/os-support/hurd/vidmem.c       |  1 +
 hw/xfree86/os-support/linux/Makefile.am   |  8 ++++----
 hw/xfree86/os-support/linux/VTsw_usl.c    |  1 +
 hw/xfree86/os-support/linux/posix_tty.c   |  1 +
 hw/xfree86/os-support/linux/sigio.c       |  1 +
 hw/xfree86/os-support/linux/vidmem.c      |  1 +
 hw/xfree86/os-support/solaris/Makefile.am | 12 ++++++------
 hw/xfree86/os-support/solaris/VTsw_noop.c |  1 +
 hw/xfree86/os-support/solaris/agp_noop.c  |  1 +
 hw/xfree86/os-support/solaris/kmod_noop.c |  1 +
 hw/xfree86/os-support/solaris/posix_tty.c |  1 +
 hw/xfree86/os-support/solaris/sigio.c     |  1 +
 hw/xfree86/os-support/solaris/vidmem.c    |  1 +
 hw/xfree86/os-support/stub/Makefile.am    | 16 ++++++++--------
 hw/xfree86/os-support/stub/VTsw_noop.c    |  1 +
 hw/xfree86/os-support/stub/agp_noop.c     |  1 +
 hw/xfree86/os-support/stub/ioperm_noop.c  |  1 +
 hw/xfree86/os-support/stub/kmod_noop.c    |  1 +
 hw/xfree86/os-support/stub/pm_noop.c      |  1 +
 hw/xfree86/os-support/stub/posix_tty.c    |  1 +
 hw/xfree86/os-support/stub/sigio.c        |  1 +
 hw/xfree86/os-support/stub/vidmem.c       |  1 +
 hw/xfree86/utils/cvt/Makefile.am          |  4 ++--
 hw/xfree86/utils/cvt/xf86cvt.c            |  1 +
 hw/xfree86/utils/cvt/xprintf.c            |  1 +
 hw/xnest/Makefile.am                      |  2 +-
 hw/xnest/miinitext.c                      |  1 +
 hw/xquartz/Makefile.am                    |  2 +-
 hw/xquartz/mach-startup/Makefile.am       |  2 +-
 hw/xquartz/mach-startup/strndup.c         |  1 +
 hw/xquartz/miinitext.c                    |  1 +
 hw/xwayland/Makefile.am                   |  6 +++---
 hw/xwayland/dpmsstubs.c                   |  1 +
 hw/xwayland/miinitext.c                   |  1 +
 hw/xwayland/stubs.c                       |  1 +
 hw/xwin/Makefile.am                       |  2 +-
 hw/xwin/miinitext.c                       |  1 +
 test/miinitext.c                          |  1 +
 75 files changed, 124 insertions(+), 57 deletions(-)
 create mode 120000 hw/dmx/config/dmxlog.c
 create mode 120000 hw/dmx/config/strlcpy.c
 create mode 120000 hw/dmx/miinitext.c
 create mode 120000 hw/dmx/panoramiX.c
 create mode 120000 hw/kdrive/src/miinitext.c
 create mode 120000 hw/vfb/miinitext.c
 create mode 120000 hw/xfree86/dixmods/miinitext.c
 create mode 120000 hw/xfree86/glamor_egl/glamor_egl.c
 create mode 120000 hw/xfree86/glamor_egl/glamor_eglmodule.c
 create mode 120000 hw/xfree86/int10/linux.c
 create mode 120000 hw/xfree86/int10/linux_vm86.c
 create mode 120000 hw/xfree86/os-support/bsd/agp_noop.c
 create mode 120000 hw/xfree86/os-support/bsd/ioperm_noop.c
 create mode 120000 hw/xfree86/os-support/bsd/kmod_noop.c
 create mode 120000 hw/xfree86/os-support/bsd/lnx_agp.c
 create mode 120000 hw/xfree86/os-support/bsd/pm_noop.c
 create mode 120000 hw/xfree86/os-support/bsd/posix_tty.c
 create mode 120000 hw/xfree86/os-support/bsd/sigio.c
 create mode 120000 hw/xfree86/os-support/bsd/vidmem.c
 create mode 120000 hw/xfree86/os-support/hurd/VTsw_noop.c
 create mode 120000 hw/xfree86/os-support/hurd/agp_noop.c
 create mode 120000 hw/xfree86/os-support/hurd/kmod_noop.c
 create mode 120000 hw/xfree86/os-support/hurd/pm_noop.c
 create mode 120000 hw/xfree86/os-support/hurd/posix_tty.c
 create mode 120000 hw/xfree86/os-support/hurd/sigiostubs.c
 create mode 120000 hw/xfree86/os-support/hurd/vidmem.c
 create mode 120000 hw/xfree86/os-support/linux/VTsw_usl.c
 create mode 120000 hw/xfree86/os-support/linux/posix_tty.c
 create mode 120000 hw/xfree86/os-support/linux/sigio.c
 create mode 120000 hw/xfree86/os-support/linux/vidmem.c
 create mode 120000 hw/xfree86/os-support/solaris/VTsw_noop.c
 create mode 120000 hw/xfree86/os-support/solaris/agp_noop.c
 create mode 120000 hw/xfree86/os-support/solaris/kmod_noop.c
 create mode 120000 hw/xfree86/os-support/solaris/posix_tty.c
 create mode 120000 hw/xfree86/os-support/solaris/sigio.c
 create mode 120000 hw/xfree86/os-support/solaris/vidmem.c
 create mode 120000 hw/xfree86/os-support/stub/VTsw_noop.c
 create mode 120000 hw/xfree86/os-support/stub/agp_noop.c
 create mode 120000 hw/xfree86/os-support/stub/ioperm_noop.c
 create mode 120000 hw/xfree86/os-support/stub/kmod_noop.c
 create mode 120000 hw/xfree86/os-support/stub/pm_noop.c
 create mode 120000 hw/xfree86/os-support/stub/posix_tty.c
 create mode 120000 hw/xfree86/os-support/stub/sigio.c
 create mode 120000 hw/xfree86/os-support/stub/vidmem.c
 create mode 120000 hw/xfree86/utils/cvt/xf86cvt.c
 create mode 120000 hw/xfree86/utils/cvt/xprintf.c
 create mode 120000 hw/xnest/miinitext.c
 create mode 120000 hw/xquartz/mach-startup/strndup.c
 create mode 120000 hw/xquartz/miinitext.c
 create mode 120000 hw/xwayland/dpmsstubs.c
 create mode 120000 hw/xwayland/miinitext.c
 create mode 120000 hw/xwayland/stubs.c
 create mode 120000 hw/xwin/miinitext.c
 create mode 120000 test/miinitext.c

diff --git a/.gitignore b/.gitignore
index dc56b4651710..4ccc3f1ff8c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ configure
 configure.scan
 depcomp
 .deps/
+.dirstamp
 INSTALL
 install-sh
 .libs/
diff --git a/configure.ac b/configure.ac
index 7e44f2c3166c..8ce7984e8990 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ RELEASE_DATE="2016-11-18"
 RELEASE_NAME="Shrimp-and-grits"
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2])
 AC_USE_SYSTEM_EXTENSIONS
 
 # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 38d6ac409e76..eff7e7bc4606 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -3,7 +3,7 @@ SUBDIRS = input config examples doc doxygen man
 bin_PROGRAMS = Xdmx
 
 if XINERAMA
-PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c
+PANORAMIX_SRCS = panoramiX.c
 endif
 
 if GLX
@@ -64,7 +64,7 @@ Xdmx_SOURCES = dmx.c \
                dmxvisual.h \
                dmxwindow.c \
                dmxwindow.h \
-               $(top_srcdir)/mi/miinitext.c \
+               miinitext.c \
                $(GLX_SRCS) 
 
 
diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am
index 06588e7a140a..74e740aac67f 100644
--- a/hw/dmx/config/Makefile.am
+++ b/hw/dmx/config/Makefile.am
@@ -21,7 +21,7 @@ BUILT_SOURCES = parser.c parser.h scanner.c
 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
 
 libdmxconfig_a_SOURCES = $(LIBSRCS)
-libdmxconfig_a_SOURCES += $(top_srcdir)/os/strlcpy.c
+libdmxconfig_a_SOURCES += strlcpy.c
 
 if GLX
 GLX_DEFS = @GL_CFLAGS@
@@ -41,7 +41,7 @@ bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx
 xdmxconfig_DEPENDENCIES = libdmxconfig.a
 xdmxconfig_SOURCES = \
 	xdmxconfig.c \
-	$(top_srcdir)/hw/dmx/dmxlog.c \
+	dmxlog.c \
 	Canvas.c \
 	Canvas.h \
 	CanvasP.h
diff --git a/hw/dmx/config/dmxlog.c b/hw/dmx/config/dmxlog.c
new file mode 120000
index 000000000000..122fc3b3fee7
--- /dev/null
+++ b/hw/dmx/config/dmxlog.c
@@ -0,0 +1 @@
+../dmxlog.c
\ No newline at end of file
diff --git a/hw/dmx/config/strlcpy.c b/hw/dmx/config/strlcpy.c
new file mode 120000
index 000000000000..722cfecf4a15
--- /dev/null
+++ b/hw/dmx/config/strlcpy.c
@@ -0,0 +1 @@
+../../../os/strlcpy.c
\ No newline at end of file
diff --git a/hw/dmx/miinitext.c b/hw/dmx/miinitext.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/dmx/miinitext.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/dmx/panoramiX.c b/hw/dmx/panoramiX.c
new file mode 120000
index 000000000000..5cb350ebdcb8
--- /dev/null
+++ b/hw/dmx/panoramiX.c
@@ -0,0 +1 @@
+../../Xext/panoramiX.c
\ No newline at end of file
diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am
index b7f94b0583c1..979cc502f2bd 100644
--- a/hw/kdrive/src/Makefile.am
+++ b/hw/kdrive/src/Makefile.am
@@ -22,7 +22,7 @@ libkdrive_la_SOURCES =	\
 	kmode.c		\
 	kshadow.c	\
 	$(KDRIVE_XV_SOURCES) \
-        $(top_srcdir)/mi/miinitext.c
+        miinitext.c
 
 if CONFIG_UDEV
 libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
diff --git a/hw/kdrive/src/miinitext.c b/hw/kdrive/src/miinitext.c
new file mode 120000
index 000000000000..f813eedf39c3
--- /dev/null
+++ b/hw/kdrive/src/miinitext.c
@@ -0,0 +1 @@
+../../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index f0f9fee478bc..1cf9c51da5ba 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -8,7 +8,7 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
 
 SRCS =	InitInput.c \
 	InitOutput.c \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.c
 
 Xvfb_SOURCES = $(SRCS)
 
diff --git a/hw/vfb/miinitext.c b/hw/vfb/miinitext.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/vfb/miinitext.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index d534c789ba8f..3390dc2f56a2 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -44,7 +44,7 @@ libshadow_la_LIBADD += libfb.la
 endif
 libshadow_la_SOURCES = shmodule.c
 
-libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+libdixmods_la_SOURCES = miinitext.c
 libdixmods_la_CFLAGS = $(AM_CFLAGS)
 
 libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
diff --git a/hw/xfree86/dixmods/miinitext.c b/hw/xfree86/dixmods/miinitext.c
new file mode 120000
index 000000000000..f813eedf39c3
--- /dev/null
+++ b/hw/xfree86/dixmods/miinitext.c
@@ -0,0 +1 @@
+../../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xfree86/glamor_egl/Makefile.am b/hw/xfree86/glamor_egl/Makefile.am
index e697c8296195..81e6d68380da 100644
--- a/hw/xfree86/glamor_egl/Makefile.am
+++ b/hw/xfree86/glamor_egl/Makefile.am
@@ -22,8 +22,8 @@
 module_LTLIBRARIES = libglamoregl.la
 
 libglamoregl_la_SOURCES = \
-	$(top_srcdir)/glamor/glamor_egl.c \
-	$(top_srcdir)/glamor/glamor_eglmodule.c \
+	glamor_egl.c \
+	glamor_eglmodule.c \
 	glamor_xf86_xv.c \
 	$()
 
diff --git a/hw/xfree86/glamor_egl/glamor_egl.c b/hw/xfree86/glamor_egl/glamor_egl.c
new file mode 120000
index 000000000000..4783ef30c133
--- /dev/null
+++ b/hw/xfree86/glamor_egl/glamor_egl.c
@@ -0,0 +1 @@
+../../../glamor/glamor_egl.c
\ No newline at end of file
diff --git a/hw/xfree86/glamor_egl/glamor_eglmodule.c b/hw/xfree86/glamor_egl/glamor_eglmodule.c
new file mode 120000
index 000000000000..3453dc5c9f46
--- /dev/null
+++ b/hw/xfree86/glamor_egl/glamor_eglmodule.c
@@ -0,0 +1 @@
+../../../glamor/glamor_eglmodule.c
\ No newline at end of file
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 66cb14d46152..0f66ac1869e2 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -23,8 +23,8 @@ if INT10_VM86
 AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
 libint10_la_SOURCES = \
 	$(COMMON_SOURCES) \
-	$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
-	$(srcdir)/../os-support/linux/int10/linux.c
+	linux_vm86.c \
+	linux.c
 endif
 
 if INT10_X86EMU
diff --git a/hw/xfree86/int10/linux.c b/hw/xfree86/int10/linux.c
new file mode 120000
index 000000000000..9478e67005ae
--- /dev/null
+++ b/hw/xfree86/int10/linux.c
@@ -0,0 +1 @@
+../os-support/linux/int10/linux.c
\ No newline at end of file
diff --git a/hw/xfree86/int10/linux_vm86.c b/hw/xfree86/int10/linux_vm86.c
new file mode 120000
index 000000000000..9e3d9ac03c45
--- /dev/null
+++ b/hw/xfree86/int10/linux_vm86.c
@@ -0,0 +1 @@
+../os-support/linux/int10/vm86/linux_vm86.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index a0140a16d9fe..d991b79d5605 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -3,7 +3,19 @@ DIST_SUBDIRS = bsd bus misc linux solaris stub hurd
 
 sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h
 
-EXTRA_DIST = int10Defines.h xf86OSpriv.h
+EXTRA_DIST = int10Defines.h xf86OSpriv.h \
+             shared/VTsw_noop.c \
+             shared/VTsw_usl.c \
+             shared/agp_noop.c \
+             shared/ioperm_noop.c \
+             shared/kmod_noop.c \
+             shared/platform_noop.c \
+             shared/pm_noop.c \
+             shared/posix_tty.c \
+             shared/sigio.c \
+             shared/sigiostubs.c \
+             shared/vidmem.c \
+             $()
 
 # to get the grouping semantics right, you have to glom these three together
 # as one library, otherwise libtool will actively defeat your attempts to
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index b01ea5bca36e..c3113c675c2d 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -2,25 +2,25 @@ noinst_LTLIBRARIES = libbsd.la
 
 # APM support.
 if BSD_KQUEUE_APM
-APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
+APM_SOURCES = bsd_kqueue_apm.c
 else 
 if BSD_APM
-APM_SOURCES = $(srcdir)/bsd_apm.c
+APM_SOURCES = bsd_apm.c
 else
-APM_SOURCES = $(srcdir)/../shared/pm_noop.c
+APM_SOURCES = pm_noop.c
 endif
 endif
 
 if FREEBSD_KLDLOAD
 KMOD_SOURCES = bsd_kmod.c
 else
-KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c
+KMOD_SOURCES = kmod_noop.c
 endif
 
 if AGP
-AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c
+AGP_SOURCES = lnx_agp.c
 else
-AGP_SOURCES = $(srcdir)/../shared/agp_noop.c
+AGP_SOURCES = agp_noop.c
 endif
 
 if ALPHA_VIDEO
@@ -46,7 +46,7 @@ if SPARC64_VIDEO
 # Cheat here and piggyback other sparc64 bits on SPARC64_VIDEO.
 ARCH_SOURCES = \
 	sparc64_video.c \
-	$(srcdir)/../shared/ioperm_noop.c
+	ioperm_noop.c
 endif
 
 # FIXME: NetBSD Aperture defines (configure.ac)
@@ -55,9 +55,9 @@ AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 
 libbsd_la_SOURCES = \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
-	$(srcdir)/../shared/vidmem.c \
+	posix_tty.c \
+	sigio.c \
+	vidmem.c \
 	bsd_VTsw.c \
 	bsd_init.c \
 	bsd_bell.c \
diff --git a/hw/xfree86/os-support/bsd/agp_noop.c b/hw/xfree86/os-support/bsd/agp_noop.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/agp_noop.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/ioperm_noop.c b/hw/xfree86/os-support/bsd/ioperm_noop.c
new file mode 120000
index 000000000000..a0f2d09dc5c0
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/ioperm_noop.c
@@ -0,0 +1 @@
+../shared/ioperm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/kmod_noop.c b/hw/xfree86/os-support/bsd/kmod_noop.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/kmod_noop.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/lnx_agp.c b/hw/xfree86/os-support/bsd/lnx_agp.c
new file mode 120000
index 000000000000..738109a9c64e
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/lnx_agp.c
@@ -0,0 +1 @@
+../linux/lnx_agp.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/pm_noop.c b/hw/xfree86/os-support/bsd/pm_noop.c
new file mode 120000
index 000000000000..2b99c7696af5
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/pm_noop.c
@@ -0,0 +1 @@
+../shared/pm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/posix_tty.c b/hw/xfree86/os-support/bsd/posix_tty.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/posix_tty.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/sigio.c b/hw/xfree86/os-support/bsd/sigio.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/sigio.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/vidmem.c b/hw/xfree86/os-support/bsd/vidmem.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/vidmem.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index 38660544ad57..3578f94f1d82 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -2,13 +2,13 @@ noinst_LTLIBRARIES = libhurd.la
 
 libhurd_la_SOURCES = hurd_bell.c hurd_init.c \
 		hurd_video.c \
-		$(srcdir)/../shared/VTsw_noop.c \
-		$(srcdir)/../shared/posix_tty.c \
-		$(srcdir)/../shared/vidmem.c \
-		$(srcdir)/../shared/sigiostubs.c \
-		$(srcdir)/../shared/pm_noop.c \
-		$(srcdir)/../shared/kmod_noop.c \
-		$(srcdir)/../shared/agp_noop.c
+		VTsw_noop.c \
+		posix_tty.c \
+		vidmem.c \
+		sigiostubs.c \
+		pm_noop.c \
+		kmod_noop.c \
+		agp_noop.c
 
 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 
diff --git a/hw/xfree86/os-support/hurd/VTsw_noop.c b/hw/xfree86/os-support/hurd/VTsw_noop.c
new file mode 120000
index 000000000000..a263942c8c62
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/VTsw_noop.c
@@ -0,0 +1 @@
+../shared/VTsw_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/agp_noop.c b/hw/xfree86/os-support/hurd/agp_noop.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/agp_noop.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/kmod_noop.c b/hw/xfree86/os-support/hurd/kmod_noop.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/kmod_noop.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/pm_noop.c b/hw/xfree86/os-support/hurd/pm_noop.c
new file mode 120000
index 000000000000..2b99c7696af5
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/pm_noop.c
@@ -0,0 +1 @@
+../shared/pm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/posix_tty.c b/hw/xfree86/os-support/hurd/posix_tty.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/posix_tty.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/sigiostubs.c b/hw/xfree86/os-support/hurd/sigiostubs.c
new file mode 120000
index 000000000000..0b6469bd7f86
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/sigiostubs.c
@@ -0,0 +1 @@
+../shared/sigiostubs.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/vidmem.c b/hw/xfree86/os-support/hurd/vidmem.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/vidmem.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 26e40bb935e3..1e2ae5f251d1 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -28,10 +28,10 @@ endif
 
 liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \
                      lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
-		     $(srcdir)/../shared/VTsw_usl.c \
-		     $(srcdir)/../shared/posix_tty.c \
-                     $(srcdir)/../shared/vidmem.c \
-		     $(srcdir)/../shared/sigio.c \
+		     VTsw_usl.c \
+		     posix_tty.c \
+                     vidmem.c \
+		     sigio.c \
                      $(ACPI_SRCS) \
                      $(APM_SRCS) \
                      $(LOGIND_SRCS)
diff --git a/hw/xfree86/os-support/linux/VTsw_usl.c b/hw/xfree86/os-support/linux/VTsw_usl.c
new file mode 120000
index 000000000000..9e45cf742180
--- /dev/null
+++ b/hw/xfree86/os-support/linux/VTsw_usl.c
@@ -0,0 +1 @@
+../shared/VTsw_usl.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/posix_tty.c b/hw/xfree86/os-support/linux/posix_tty.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/linux/posix_tty.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/sigio.c b/hw/xfree86/os-support/linux/sigio.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/linux/sigio.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/vidmem.c b/hw/xfree86/os-support/linux/vidmem.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/linux/vidmem.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index e534bc8dc2c6..b5d1d3066872 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,13 +1,13 @@
 if SOLARIS_VT
 VTSW_SRC = sun_VTsw.c
 else
-VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
+VTSW_SRC = VTsw_noop.c
 endif
 
 if AGP
 AGP_SRC = sun_agp.c
 else
-AGP_SRC = $(srcdir)/../shared/agp_noop.c
+AGP_SRC = agp_noop.c
 endif
 
 SOLARIS_INOUT_SRC = solaris-@[email protected]
@@ -19,10 +19,10 @@ solaris-@[email protected]: solaris-@[email protected]
 noinst_LTLIBRARIES = libsolaris.la
 libsolaris_la_SOURCES = sun_init.c \
 	sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
-	$(srcdir)/../shared/kmod_noop.c \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
-	$(srcdir)/../shared/vidmem.c \
+	kmod_noop.c \
+	posix_tty.c \
+	sigio.c \
+	vidmem.c \
 	$(VTSW_SRC)
 nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
 
diff --git a/hw/xfree86/os-support/solaris/VTsw_noop.c b/hw/xfree86/os-support/solaris/VTsw_noop.c
new file mode 120000
index 000000000000..a263942c8c62
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/VTsw_noop.c
@@ -0,0 +1 @@
+../shared/VTsw_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/agp_noop.c b/hw/xfree86/os-support/solaris/agp_noop.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/agp_noop.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/kmod_noop.c b/hw/xfree86/os-support/solaris/kmod_noop.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/kmod_noop.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/posix_tty.c b/hw/xfree86/os-support/solaris/posix_tty.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/posix_tty.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/sigio.c b/hw/xfree86/os-support/solaris/sigio.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/sigio.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/vidmem.c b/hw/xfree86/os-support/solaris/vidmem.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/vidmem.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/Makefile.am b/hw/xfree86/os-support/stub/Makefile.am
index 19468c6de281..44fcbc1b5818 100644
--- a/hw/xfree86/os-support/stub/Makefile.am
+++ b/hw/xfree86/os-support/stub/Makefile.am
@@ -5,14 +5,14 @@ AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 
 libstub_la_SOURCES = \
-	$(srcdir)/../shared/VTsw_noop.c \
-	$(srcdir)/../shared/agp_noop.c \
-	$(srcdir)/../shared/ioperm_noop.c \
-	$(srcdir)/../shared/kmod_noop.c \
-	$(srcdir)/../shared/pm_noop.c \
-	$(srcdir)/../shared/vidmem.c \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
+	VTsw_noop.c \
+	agp_noop.c \
+	ioperm_noop.c \
+	kmod_noop.c \
+	pm_noop.c \
+	vidmem.c \
+	posix_tty.c \
+	sigio.c \
 	stub_bell.c \
 	stub_init.c \
 	stub_video.c
diff --git a/hw/xfree86/os-support/stub/VTsw_noop.c b/hw/xfree86/os-support/stub/VTsw_noop.c
new file mode 120000
index 000000000000..a263942c8c62
--- /dev/null
+++ b/hw/xfree86/os-support/stub/VTsw_noop.c
@@ -0,0 +1 @@
+../shared/VTsw_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/agp_noop.c b/hw/xfree86/os-support/stub/agp_noop.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/stub/agp_noop.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/ioperm_noop.c b/hw/xfree86/os-support/stub/ioperm_noop.c
new file mode 120000
index 000000000000..a0f2d09dc5c0
--- /dev/null
+++ b/hw/xfree86/os-support/stub/ioperm_noop.c
@@ -0,0 +1 @@
+../shared/ioperm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/kmod_noop.c b/hw/xfree86/os-support/stub/kmod_noop.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/stub/kmod_noop.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/pm_noop.c b/hw/xfree86/os-support/stub/pm_noop.c
new file mode 120000
index 000000000000..2b99c7696af5
--- /dev/null
+++ b/hw/xfree86/os-support/stub/pm_noop.c
@@ -0,0 +1 @@
+../shared/pm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/posix_tty.c b/hw/xfree86/os-support/stub/posix_tty.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/stub/posix_tty.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/sigio.c b/hw/xfree86/os-support/stub/sigio.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/stub/sigio.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/vidmem.c b/hw/xfree86/os-support/stub/vidmem.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/stub/vidmem.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/utils/cvt/Makefile.am b/hw/xfree86/utils/cvt/Makefile.am
index 26abeb40be9a..63a0d1b3229b 100644
--- a/hw/xfree86/utils/cvt/Makefile.am
+++ b/hw/xfree86/utils/cvt/Makefile.am
@@ -29,7 +29,7 @@ AM_CPPFLAGS = $(XORG_INCS) \
 
 # gah
 cvt_SOURCES = cvt.c \
-	$(top_srcdir)/hw/xfree86/modes/xf86cvt.c \
-	$(top_srcdir)/os/xprintf.c
+	xf86cvt.c \
+	xprintf.c
 
 cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/hw/xfree86/utils/cvt/xf86cvt.c b/hw/xfree86/utils/cvt/xf86cvt.c
new file mode 120000
index 000000000000..ce6a8f4a1e2a
--- /dev/null
+++ b/hw/xfree86/utils/cvt/xf86cvt.c
@@ -0,0 +1 @@
+../../modes/xf86cvt.c
\ No newline at end of file
diff --git a/hw/xfree86/utils/cvt/xprintf.c b/hw/xfree86/utils/cvt/xprintf.c
new file mode 120000
index 000000000000..7024cb7af8af
--- /dev/null
+++ b/hw/xfree86/utils/cvt/xprintf.c
@@ -0,0 +1 @@
+../../../../os/xprintf.c
\ No newline at end of file
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index eb550c0f7d67..d19753341ed2 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -41,7 +41,7 @@ SRCS =	Args.c \
 	XNPixmap.h \
 	XNWindow.h \
 	xnest-config.h \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.c
 
 XNEST_LIBS = \
         @XNEST_LIBS@ \
diff --git a/hw/xnest/miinitext.c b/hw/xnest/miinitext.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xnest/miinitext.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 5ccbe48917bc..8e30f60cbbe8 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -20,7 +20,7 @@ SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man
 DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man
 
 libXquartz_la_SOURCES = \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.c \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 77962b14d19c..1ef95c57704b 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -16,7 +16,7 @@ dist_X11_bin_SOURCES = \
 # with the case where we build on Lion but target Snow Leopard as the minimum
 # OS version.
 #if NEED_STRNDUP
-dist_X11_bin_SOURCES += $(top_srcdir)/os/strndup.c
+dist_X11_bin_SOURCES += strndup.c
 #endif
 
 nodist_X11_bin_SOURCES = \
diff --git a/hw/xquartz/mach-startup/strndup.c b/hw/xquartz/mach-startup/strndup.c
new file mode 120000
index 000000000000..cef9d580f3d7
--- /dev/null
+++ b/hw/xquartz/mach-startup/strndup.c
@@ -0,0 +1 @@
+../../../os/strndup.c
\ No newline at end of file
diff --git a/hw/xquartz/miinitext.c b/hw/xquartz/miinitext.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xquartz/miinitext.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am
index a3c9fce48226..301fe41223ce 100644
--- a/hw/xwayland/Makefile.am
+++ b/hw/xwayland/Makefile.am
@@ -18,9 +18,9 @@ Xwayland_SOURCES =				\
 	xwayland-cvt.c				\
 	xwayland-vidmode.c			\
 	xwayland.h				\
-	$(top_srcdir)/Xext/dpmsstubs.c		\
-	$(top_srcdir)/Xi/stubs.c		\
-	$(top_srcdir)/mi/miinitext.c
+	dpmsstubs.c				\
+	stubs.c				\
+	miinitext.c
 
 Xwayland_LDADD =				\
 	$(glamor_lib)				\
diff --git a/hw/xwayland/dpmsstubs.c b/hw/xwayland/dpmsstubs.c
new file mode 120000
index 000000000000..ae4697ed2855
--- /dev/null
+++ b/hw/xwayland/dpmsstubs.c
@@ -0,0 +1 @@
+../../Xext/dpmsstubs.c
\ No newline at end of file
diff --git a/hw/xwayland/miinitext.c b/hw/xwayland/miinitext.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xwayland/miinitext.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xwayland/stubs.c b/hw/xwayland/stubs.c
new file mode 120000
index 000000000000..71a6c8864c24
--- /dev/null
+++ b/hw/xwayland/stubs.c
@@ -0,0 +1 @@
+../../Xi/stubs.c
\ No newline at end of file
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 0846230b00b2..b11707e227b8 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -112,7 +112,7 @@ SRCS =	InitInput.c \
 	windisplay.c \
 	windisplay.h \
 	XWin.rc \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.c \
 	$(SRCS_CLIPBOARD) \
 	$(SRCS_MULTIWINDOW) \
 	$(SRCS_MULTIWINDOWEXTWM) \
diff --git a/hw/xwin/miinitext.c b/hw/xwin/miinitext.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xwin/miinitext.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/test/miinitext.c b/test/miinitext.c
new file mode 120000
index 000000000000..7fe401c4c5ac
--- /dev/null
+++ b/test/miinitext.c
@@ -0,0 +1 @@
+../mi/miinitext.c
\ No newline at end of file
-- 
2.9.2

>From 98e4bed27d1ea29e94ebc620bdc1e61302da1e67 Mon Sep 17 00:00:00 2001
From: Mihail Konev <[email protected]>
Date: Thu, 16 Feb 2017 22:14:45 +0500
Subject: [PATCH xserver] configure.ac: use automake option subdir-objects

Both fixes "source file is in a subdirectory" autoreconf warnings and
ensures automake 2.0 (future) compatibility.

Symlinked sources are so that every dir has its own file, and therefore,
does not reuse compilation results of another (objects are now put where
the source is, not the makefile), thus retaining the CFLAGS and other
settings as before.

The *.ln.c naming is for explicitness in makefiles.

Explicitly distribute hw/xfree86/os-support/shared/, as other dirs
now wouldn't do that implicitly by referencing source files from it.

Signed-off-by: Mihail Konev <[email protected]>
---
 .gitignore                                   |  1 +
 configure.ac                                 |  2 +-
 hw/dmx/Makefile.am                           |  4 ++--
 hw/dmx/config/Makefile.am                    |  4 ++--
 hw/dmx/config/dmxlog.ln.c                    |  1 +
 hw/dmx/config/strlcpy.ln.c                   |  1 +
 hw/dmx/miinitext.ln.c                        |  1 +
 hw/dmx/panoramiX.ln.c                        |  1 +
 hw/kdrive/src/Makefile.am                    |  2 +-
 hw/kdrive/src/miinitext.ln.c                 |  1 +
 hw/vfb/Makefile.am                           |  2 +-
 hw/vfb/miinitext.ln.c                        |  1 +
 hw/xfree86/dixmods/Makefile.am               |  2 +-
 hw/xfree86/dixmods/miinitext.ln.c            |  1 +
 hw/xfree86/glamor_egl/Makefile.am            |  4 ++--
 hw/xfree86/glamor_egl/glamor_egl.ln.c        |  1 +
 hw/xfree86/glamor_egl/glamor_eglmodule.ln.c  |  1 +
 hw/xfree86/int10/Makefile.am                 |  4 ++--
 hw/xfree86/int10/linux.ln.c                  |  1 +
 hw/xfree86/int10/linux_vm86.ln.c             |  1 +
 hw/xfree86/os-support/Makefile.am            | 14 +++++++++++++-
 hw/xfree86/os-support/bsd/Makefile.am        | 20 ++++++++++----------
 hw/xfree86/os-support/bsd/agp_noop.ln.c      |  1 +
 hw/xfree86/os-support/bsd/ioperm_noop.ln.c   |  1 +
 hw/xfree86/os-support/bsd/kmod_noop.ln.c     |  1 +
 hw/xfree86/os-support/bsd/lnx_agp.ln.c       |  1 +
 hw/xfree86/os-support/bsd/pm_noop.ln.c       |  1 +
 hw/xfree86/os-support/bsd/posix_tty.ln.c     |  1 +
 hw/xfree86/os-support/bsd/sigio.ln.c         |  1 +
 hw/xfree86/os-support/bsd/vidmem.ln.c        |  1 +
 hw/xfree86/os-support/hurd/Makefile.am       | 14 +++++++-------
 hw/xfree86/os-support/hurd/VTsw_noop.ln.c    |  1 +
 hw/xfree86/os-support/hurd/agp_noop.ln.c     |  1 +
 hw/xfree86/os-support/hurd/kmod_noop.ln.c    |  1 +
 hw/xfree86/os-support/hurd/pm_noop.ln.c      |  1 +
 hw/xfree86/os-support/hurd/posix_tty.ln.c    |  1 +
 hw/xfree86/os-support/hurd/sigiostubs.ln.c   |  1 +
 hw/xfree86/os-support/hurd/vidmem.ln.c       |  1 +
 hw/xfree86/os-support/linux/Makefile.am      |  8 ++++----
 hw/xfree86/os-support/linux/VTsw_usl.ln.c    |  1 +
 hw/xfree86/os-support/linux/posix_tty.ln.c   |  1 +
 hw/xfree86/os-support/linux/sigio.ln.c       |  1 +
 hw/xfree86/os-support/linux/vidmem.ln.c      |  1 +
 hw/xfree86/os-support/solaris/Makefile.am    | 12 ++++++------
 hw/xfree86/os-support/solaris/VTsw_noop.ln.c |  1 +
 hw/xfree86/os-support/solaris/agp_noop.ln.c  |  1 +
 hw/xfree86/os-support/solaris/kmod_noop.ln.c |  1 +
 hw/xfree86/os-support/solaris/posix_tty.ln.c |  1 +
 hw/xfree86/os-support/solaris/sigio.ln.c     |  1 +
 hw/xfree86/os-support/solaris/vidmem.ln.c    |  1 +
 hw/xfree86/os-support/stub/Makefile.am       | 16 ++++++++--------
 hw/xfree86/os-support/stub/VTsw_noop.ln.c    |  1 +
 hw/xfree86/os-support/stub/agp_noop.ln.c     |  1 +
 hw/xfree86/os-support/stub/ioperm_noop.ln.c  |  1 +
 hw/xfree86/os-support/stub/kmod_noop.ln.c    |  1 +
 hw/xfree86/os-support/stub/pm_noop.ln.c      |  1 +
 hw/xfree86/os-support/stub/posix_tty.ln.c    |  1 +
 hw/xfree86/os-support/stub/sigio.ln.c        |  1 +
 hw/xfree86/os-support/stub/vidmem.ln.c       |  1 +
 hw/xfree86/utils/cvt/Makefile.am             |  4 ++--
 hw/xfree86/utils/cvt/xf86cvt.ln.c            |  1 +
 hw/xfree86/utils/cvt/xprintf.ln.c            |  1 +
 hw/xnest/Makefile.am                         |  2 +-
 hw/xnest/miinitext.ln.c                      |  1 +
 hw/xquartz/Makefile.am                       |  2 +-
 hw/xquartz/mach-startup/Makefile.am          |  2 +-
 hw/xquartz/mach-startup/strndup.ln.c         |  1 +
 hw/xquartz/miinitext.ln.c                    |  1 +
 hw/xwayland/Makefile.am                      |  6 +++---
 hw/xwayland/dpmsstubs.ln.c                   |  1 +
 hw/xwayland/miinitext.ln.c                   |  1 +
 hw/xwayland/stubs.ln.c                       |  1 +
 hw/xwin/Makefile.am                          |  2 +-
 hw/xwin/miinitext.ln.c                       |  1 +
 test/miinitext.ln.c                          |  1 +
 75 files changed, 124 insertions(+), 57 deletions(-)
 create mode 120000 hw/dmx/config/dmxlog.ln.c
 create mode 120000 hw/dmx/config/strlcpy.ln.c
 create mode 120000 hw/dmx/miinitext.ln.c
 create mode 120000 hw/dmx/panoramiX.ln.c
 create mode 120000 hw/kdrive/src/miinitext.ln.c
 create mode 120000 hw/vfb/miinitext.ln.c
 create mode 120000 hw/xfree86/dixmods/miinitext.ln.c
 create mode 120000 hw/xfree86/glamor_egl/glamor_egl.ln.c
 create mode 120000 hw/xfree86/glamor_egl/glamor_eglmodule.ln.c
 create mode 120000 hw/xfree86/int10/linux.ln.c
 create mode 120000 hw/xfree86/int10/linux_vm86.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/agp_noop.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/ioperm_noop.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/kmod_noop.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/lnx_agp.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/pm_noop.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/posix_tty.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/sigio.ln.c
 create mode 120000 hw/xfree86/os-support/bsd/vidmem.ln.c
 create mode 120000 hw/xfree86/os-support/hurd/VTsw_noop.ln.c
 create mode 120000 hw/xfree86/os-support/hurd/agp_noop.ln.c
 create mode 120000 hw/xfree86/os-support/hurd/kmod_noop.ln.c
 create mode 120000 hw/xfree86/os-support/hurd/pm_noop.ln.c
 create mode 120000 hw/xfree86/os-support/hurd/posix_tty.ln.c
 create mode 120000 hw/xfree86/os-support/hurd/sigiostubs.ln.c
 create mode 120000 hw/xfree86/os-support/hurd/vidmem.ln.c
 create mode 120000 hw/xfree86/os-support/linux/VTsw_usl.ln.c
 create mode 120000 hw/xfree86/os-support/linux/posix_tty.ln.c
 create mode 120000 hw/xfree86/os-support/linux/sigio.ln.c
 create mode 120000 hw/xfree86/os-support/linux/vidmem.ln.c
 create mode 120000 hw/xfree86/os-support/solaris/VTsw_noop.ln.c
 create mode 120000 hw/xfree86/os-support/solaris/agp_noop.ln.c
 create mode 120000 hw/xfree86/os-support/solaris/kmod_noop.ln.c
 create mode 120000 hw/xfree86/os-support/solaris/posix_tty.ln.c
 create mode 120000 hw/xfree86/os-support/solaris/sigio.ln.c
 create mode 120000 hw/xfree86/os-support/solaris/vidmem.ln.c
 create mode 120000 hw/xfree86/os-support/stub/VTsw_noop.ln.c
 create mode 120000 hw/xfree86/os-support/stub/agp_noop.ln.c
 create mode 120000 hw/xfree86/os-support/stub/ioperm_noop.ln.c
 create mode 120000 hw/xfree86/os-support/stub/kmod_noop.ln.c
 create mode 120000 hw/xfree86/os-support/stub/pm_noop.ln.c
 create mode 120000 hw/xfree86/os-support/stub/posix_tty.ln.c
 create mode 120000 hw/xfree86/os-support/stub/sigio.ln.c
 create mode 120000 hw/xfree86/os-support/stub/vidmem.ln.c
 create mode 120000 hw/xfree86/utils/cvt/xf86cvt.ln.c
 create mode 120000 hw/xfree86/utils/cvt/xprintf.ln.c
 create mode 120000 hw/xnest/miinitext.ln.c
 create mode 120000 hw/xquartz/mach-startup/strndup.ln.c
 create mode 120000 hw/xquartz/miinitext.ln.c
 create mode 120000 hw/xwayland/dpmsstubs.ln.c
 create mode 120000 hw/xwayland/miinitext.ln.c
 create mode 120000 hw/xwayland/stubs.ln.c
 create mode 120000 hw/xwin/miinitext.ln.c
 create mode 120000 test/miinitext.ln.c

diff --git a/.gitignore b/.gitignore
index dc56b4651710..4ccc3f1ff8c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ configure
 configure.scan
 depcomp
 .deps/
+.dirstamp
 INSTALL
 install-sh
 .libs/
diff --git a/configure.ac b/configure.ac
index 7e44f2c3166c..8ce7984e8990 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ RELEASE_DATE="2016-11-18"
 RELEASE_NAME="Shrimp-and-grits"
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2])
 AC_USE_SYSTEM_EXTENSIONS
 
 # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 38d6ac409e76..25fa172c883f 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -3,7 +3,7 @@ SUBDIRS = input config examples doc doxygen man
 bin_PROGRAMS = Xdmx
 
 if XINERAMA
-PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c
+PANORAMIX_SRCS = panoramiX.ln.c
 endif
 
 if GLX
@@ -64,7 +64,7 @@ Xdmx_SOURCES = dmx.c \
                dmxvisual.h \
                dmxwindow.c \
                dmxwindow.h \
-               $(top_srcdir)/mi/miinitext.c \
+               miinitext.ln.c \
                $(GLX_SRCS) 
 
 
diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am
index 06588e7a140a..aaf77aa092b2 100644
--- a/hw/dmx/config/Makefile.am
+++ b/hw/dmx/config/Makefile.am
@@ -21,7 +21,7 @@ BUILT_SOURCES = parser.c parser.h scanner.c
 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
 
 libdmxconfig_a_SOURCES = $(LIBSRCS)
-libdmxconfig_a_SOURCES += $(top_srcdir)/os/strlcpy.c
+libdmxconfig_a_SOURCES += strlcpy.ln.c
 
 if GLX
 GLX_DEFS = @GL_CFLAGS@
@@ -41,7 +41,7 @@ bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx
 xdmxconfig_DEPENDENCIES = libdmxconfig.a
 xdmxconfig_SOURCES = \
 	xdmxconfig.c \
-	$(top_srcdir)/hw/dmx/dmxlog.c \
+	dmxlog.ln.c \
 	Canvas.c \
 	Canvas.h \
 	CanvasP.h
diff --git a/hw/dmx/config/dmxlog.ln.c b/hw/dmx/config/dmxlog.ln.c
new file mode 120000
index 000000000000..122fc3b3fee7
--- /dev/null
+++ b/hw/dmx/config/dmxlog.ln.c
@@ -0,0 +1 @@
+../dmxlog.c
\ No newline at end of file
diff --git a/hw/dmx/config/strlcpy.ln.c b/hw/dmx/config/strlcpy.ln.c
new file mode 120000
index 000000000000..722cfecf4a15
--- /dev/null
+++ b/hw/dmx/config/strlcpy.ln.c
@@ -0,0 +1 @@
+../../../os/strlcpy.c
\ No newline at end of file
diff --git a/hw/dmx/miinitext.ln.c b/hw/dmx/miinitext.ln.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/dmx/miinitext.ln.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/dmx/panoramiX.ln.c b/hw/dmx/panoramiX.ln.c
new file mode 120000
index 000000000000..5cb350ebdcb8
--- /dev/null
+++ b/hw/dmx/panoramiX.ln.c
@@ -0,0 +1 @@
+../../Xext/panoramiX.c
\ No newline at end of file
diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am
index b7f94b0583c1..c40046bf196b 100644
--- a/hw/kdrive/src/Makefile.am
+++ b/hw/kdrive/src/Makefile.am
@@ -22,7 +22,7 @@ libkdrive_la_SOURCES =	\
 	kmode.c		\
 	kshadow.c	\
 	$(KDRIVE_XV_SOURCES) \
-        $(top_srcdir)/mi/miinitext.c
+        miinitext.ln.c
 
 if CONFIG_UDEV
 libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
diff --git a/hw/kdrive/src/miinitext.ln.c b/hw/kdrive/src/miinitext.ln.c
new file mode 120000
index 000000000000..f813eedf39c3
--- /dev/null
+++ b/hw/kdrive/src/miinitext.ln.c
@@ -0,0 +1 @@
+../../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index f0f9fee478bc..a0fc4c9a5391 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -8,7 +8,7 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
 
 SRCS =	InitInput.c \
 	InitOutput.c \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.ln.c
 
 Xvfb_SOURCES = $(SRCS)
 
diff --git a/hw/vfb/miinitext.ln.c b/hw/vfb/miinitext.ln.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/vfb/miinitext.ln.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index d534c789ba8f..7becce58eeb6 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -44,7 +44,7 @@ libshadow_la_LIBADD += libfb.la
 endif
 libshadow_la_SOURCES = shmodule.c
 
-libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+libdixmods_la_SOURCES = miinitext.ln.c
 libdixmods_la_CFLAGS = $(AM_CFLAGS)
 
 libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
diff --git a/hw/xfree86/dixmods/miinitext.ln.c b/hw/xfree86/dixmods/miinitext.ln.c
new file mode 120000
index 000000000000..f813eedf39c3
--- /dev/null
+++ b/hw/xfree86/dixmods/miinitext.ln.c
@@ -0,0 +1 @@
+../../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xfree86/glamor_egl/Makefile.am b/hw/xfree86/glamor_egl/Makefile.am
index e697c8296195..7ea3c669908f 100644
--- a/hw/xfree86/glamor_egl/Makefile.am
+++ b/hw/xfree86/glamor_egl/Makefile.am
@@ -22,8 +22,8 @@
 module_LTLIBRARIES = libglamoregl.la
 
 libglamoregl_la_SOURCES = \
-	$(top_srcdir)/glamor/glamor_egl.c \
-	$(top_srcdir)/glamor/glamor_eglmodule.c \
+	glamor_egl.ln.c \
+	glamor_eglmodule.ln.c \
 	glamor_xf86_xv.c \
 	$()
 
diff --git a/hw/xfree86/glamor_egl/glamor_egl.ln.c b/hw/xfree86/glamor_egl/glamor_egl.ln.c
new file mode 120000
index 000000000000..4783ef30c133
--- /dev/null
+++ b/hw/xfree86/glamor_egl/glamor_egl.ln.c
@@ -0,0 +1 @@
+../../../glamor/glamor_egl.c
\ No newline at end of file
diff --git a/hw/xfree86/glamor_egl/glamor_eglmodule.ln.c b/hw/xfree86/glamor_egl/glamor_eglmodule.ln.c
new file mode 120000
index 000000000000..3453dc5c9f46
--- /dev/null
+++ b/hw/xfree86/glamor_egl/glamor_eglmodule.ln.c
@@ -0,0 +1 @@
+../../../glamor/glamor_eglmodule.c
\ No newline at end of file
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 66cb14d46152..a409eab43260 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -23,8 +23,8 @@ if INT10_VM86
 AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
 libint10_la_SOURCES = \
 	$(COMMON_SOURCES) \
-	$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
-	$(srcdir)/../os-support/linux/int10/linux.c
+	linux_vm86.ln.c \
+	linux.ln.c
 endif
 
 if INT10_X86EMU
diff --git a/hw/xfree86/int10/linux.ln.c b/hw/xfree86/int10/linux.ln.c
new file mode 120000
index 000000000000..9478e67005ae
--- /dev/null
+++ b/hw/xfree86/int10/linux.ln.c
@@ -0,0 +1 @@
+../os-support/linux/int10/linux.c
\ No newline at end of file
diff --git a/hw/xfree86/int10/linux_vm86.ln.c b/hw/xfree86/int10/linux_vm86.ln.c
new file mode 120000
index 000000000000..9e3d9ac03c45
--- /dev/null
+++ b/hw/xfree86/int10/linux_vm86.ln.c
@@ -0,0 +1 @@
+../os-support/linux/int10/vm86/linux_vm86.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index a0140a16d9fe..d991b79d5605 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -3,7 +3,19 @@ DIST_SUBDIRS = bsd bus misc linux solaris stub hurd
 
 sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h
 
-EXTRA_DIST = int10Defines.h xf86OSpriv.h
+EXTRA_DIST = int10Defines.h xf86OSpriv.h \
+             shared/VTsw_noop.c \
+             shared/VTsw_usl.c \
+             shared/agp_noop.c \
+             shared/ioperm_noop.c \
+             shared/kmod_noop.c \
+             shared/platform_noop.c \
+             shared/pm_noop.c \
+             shared/posix_tty.c \
+             shared/sigio.c \
+             shared/sigiostubs.c \
+             shared/vidmem.c \
+             $()
 
 # to get the grouping semantics right, you have to glom these three together
 # as one library, otherwise libtool will actively defeat your attempts to
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index b01ea5bca36e..4cd72b545a01 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -2,25 +2,25 @@ noinst_LTLIBRARIES = libbsd.la
 
 # APM support.
 if BSD_KQUEUE_APM
-APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
+APM_SOURCES = bsd_kqueue_apm.c
 else 
 if BSD_APM
-APM_SOURCES = $(srcdir)/bsd_apm.c
+APM_SOURCES = bsd_apm.c
 else
-APM_SOURCES = $(srcdir)/../shared/pm_noop.c
+APM_SOURCES = pm_noop.ln.c
 endif
 endif
 
 if FREEBSD_KLDLOAD
 KMOD_SOURCES = bsd_kmod.c
 else
-KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c
+KMOD_SOURCES = kmod_noop.ln.c
 endif
 
 if AGP
-AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c
+AGP_SOURCES = lnx_agp.ln.c
 else
-AGP_SOURCES = $(srcdir)/../shared/agp_noop.c
+AGP_SOURCES = agp_noop.ln.c
 endif
 
 if ALPHA_VIDEO
@@ -46,7 +46,7 @@ if SPARC64_VIDEO
 # Cheat here and piggyback other sparc64 bits on SPARC64_VIDEO.
 ARCH_SOURCES = \
 	sparc64_video.c \
-	$(srcdir)/../shared/ioperm_noop.c
+	ioperm_noop.ln.c
 endif
 
 # FIXME: NetBSD Aperture defines (configure.ac)
@@ -55,9 +55,9 @@ AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 
 libbsd_la_SOURCES = \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
-	$(srcdir)/../shared/vidmem.c \
+	posix_tty.ln.c \
+	sigio.ln.c \
+	vidmem.ln.c \
 	bsd_VTsw.c \
 	bsd_init.c \
 	bsd_bell.c \
diff --git a/hw/xfree86/os-support/bsd/agp_noop.ln.c b/hw/xfree86/os-support/bsd/agp_noop.ln.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/agp_noop.ln.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/ioperm_noop.ln.c b/hw/xfree86/os-support/bsd/ioperm_noop.ln.c
new file mode 120000
index 000000000000..a0f2d09dc5c0
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/ioperm_noop.ln.c
@@ -0,0 +1 @@
+../shared/ioperm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/kmod_noop.ln.c b/hw/xfree86/os-support/bsd/kmod_noop.ln.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/kmod_noop.ln.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/lnx_agp.ln.c b/hw/xfree86/os-support/bsd/lnx_agp.ln.c
new file mode 120000
index 000000000000..738109a9c64e
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/lnx_agp.ln.c
@@ -0,0 +1 @@
+../linux/lnx_agp.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/pm_noop.ln.c b/hw/xfree86/os-support/bsd/pm_noop.ln.c
new file mode 120000
index 000000000000..2b99c7696af5
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/pm_noop.ln.c
@@ -0,0 +1 @@
+../shared/pm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/posix_tty.ln.c b/hw/xfree86/os-support/bsd/posix_tty.ln.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/posix_tty.ln.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/sigio.ln.c b/hw/xfree86/os-support/bsd/sigio.ln.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/sigio.ln.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/bsd/vidmem.ln.c b/hw/xfree86/os-support/bsd/vidmem.ln.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/vidmem.ln.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index 38660544ad57..d58099be027a 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -2,13 +2,13 @@ noinst_LTLIBRARIES = libhurd.la
 
 libhurd_la_SOURCES = hurd_bell.c hurd_init.c \
 		hurd_video.c \
-		$(srcdir)/../shared/VTsw_noop.c \
-		$(srcdir)/../shared/posix_tty.c \
-		$(srcdir)/../shared/vidmem.c \
-		$(srcdir)/../shared/sigiostubs.c \
-		$(srcdir)/../shared/pm_noop.c \
-		$(srcdir)/../shared/kmod_noop.c \
-		$(srcdir)/../shared/agp_noop.c
+		VTsw_noop.ln.c \
+		posix_tty.ln.c \
+		vidmem.ln.c \
+		sigiostubs.ln.c \
+		pm_noop.ln.c \
+		kmod_noop.ln.c \
+		agp_noop.ln.c
 
 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 
diff --git a/hw/xfree86/os-support/hurd/VTsw_noop.ln.c b/hw/xfree86/os-support/hurd/VTsw_noop.ln.c
new file mode 120000
index 000000000000..a263942c8c62
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/VTsw_noop.ln.c
@@ -0,0 +1 @@
+../shared/VTsw_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/agp_noop.ln.c b/hw/xfree86/os-support/hurd/agp_noop.ln.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/agp_noop.ln.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/kmod_noop.ln.c b/hw/xfree86/os-support/hurd/kmod_noop.ln.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/kmod_noop.ln.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/pm_noop.ln.c b/hw/xfree86/os-support/hurd/pm_noop.ln.c
new file mode 120000
index 000000000000..2b99c7696af5
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/pm_noop.ln.c
@@ -0,0 +1 @@
+../shared/pm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/posix_tty.ln.c b/hw/xfree86/os-support/hurd/posix_tty.ln.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/posix_tty.ln.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/sigiostubs.ln.c b/hw/xfree86/os-support/hurd/sigiostubs.ln.c
new file mode 120000
index 000000000000..0b6469bd7f86
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/sigiostubs.ln.c
@@ -0,0 +1 @@
+../shared/sigiostubs.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/hurd/vidmem.ln.c b/hw/xfree86/os-support/hurd/vidmem.ln.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/vidmem.ln.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 26e40bb935e3..195b0fd5af1a 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -28,10 +28,10 @@ endif
 
 liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \
                      lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
-		     $(srcdir)/../shared/VTsw_usl.c \
-		     $(srcdir)/../shared/posix_tty.c \
-                     $(srcdir)/../shared/vidmem.c \
-		     $(srcdir)/../shared/sigio.c \
+		     VTsw_usl.ln.c \
+		     posix_tty.ln.c \
+                     vidmem.ln.c \
+		     sigio.ln.c \
                      $(ACPI_SRCS) \
                      $(APM_SRCS) \
                      $(LOGIND_SRCS)
diff --git a/hw/xfree86/os-support/linux/VTsw_usl.ln.c b/hw/xfree86/os-support/linux/VTsw_usl.ln.c
new file mode 120000
index 000000000000..9e45cf742180
--- /dev/null
+++ b/hw/xfree86/os-support/linux/VTsw_usl.ln.c
@@ -0,0 +1 @@
+../shared/VTsw_usl.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/posix_tty.ln.c b/hw/xfree86/os-support/linux/posix_tty.ln.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/linux/posix_tty.ln.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/sigio.ln.c b/hw/xfree86/os-support/linux/sigio.ln.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/linux/sigio.ln.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/linux/vidmem.ln.c b/hw/xfree86/os-support/linux/vidmem.ln.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/linux/vidmem.ln.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index e534bc8dc2c6..f907e3152d60 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,13 +1,13 @@
 if SOLARIS_VT
 VTSW_SRC = sun_VTsw.c
 else
-VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
+VTSW_SRC = VTsw_noop.ln.c
 endif
 
 if AGP
 AGP_SRC = sun_agp.c
 else
-AGP_SRC = $(srcdir)/../shared/agp_noop.c
+AGP_SRC = agp_noop.ln.c
 endif
 
 SOLARIS_INOUT_SRC = solaris-@[email protected]
@@ -19,10 +19,10 @@ solaris-@[email protected]: solaris-@[email protected]
 noinst_LTLIBRARIES = libsolaris.la
 libsolaris_la_SOURCES = sun_init.c \
 	sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
-	$(srcdir)/../shared/kmod_noop.c \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
-	$(srcdir)/../shared/vidmem.c \
+	kmod_noop.ln.c \
+	posix_tty.ln.c \
+	sigio.ln.c \
+	vidmem.ln.c \
 	$(VTSW_SRC)
 nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
 
diff --git a/hw/xfree86/os-support/solaris/VTsw_noop.ln.c b/hw/xfree86/os-support/solaris/VTsw_noop.ln.c
new file mode 120000
index 000000000000..a263942c8c62
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/VTsw_noop.ln.c
@@ -0,0 +1 @@
+../shared/VTsw_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/agp_noop.ln.c b/hw/xfree86/os-support/solaris/agp_noop.ln.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/agp_noop.ln.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/kmod_noop.ln.c b/hw/xfree86/os-support/solaris/kmod_noop.ln.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/kmod_noop.ln.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/posix_tty.ln.c b/hw/xfree86/os-support/solaris/posix_tty.ln.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/posix_tty.ln.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/sigio.ln.c b/hw/xfree86/os-support/solaris/sigio.ln.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/sigio.ln.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/solaris/vidmem.ln.c b/hw/xfree86/os-support/solaris/vidmem.ln.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/vidmem.ln.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/Makefile.am b/hw/xfree86/os-support/stub/Makefile.am
index 19468c6de281..7d0da9ede564 100644
--- a/hw/xfree86/os-support/stub/Makefile.am
+++ b/hw/xfree86/os-support/stub/Makefile.am
@@ -5,14 +5,14 @@ AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 
 libstub_la_SOURCES = \
-	$(srcdir)/../shared/VTsw_noop.c \
-	$(srcdir)/../shared/agp_noop.c \
-	$(srcdir)/../shared/ioperm_noop.c \
-	$(srcdir)/../shared/kmod_noop.c \
-	$(srcdir)/../shared/pm_noop.c \
-	$(srcdir)/../shared/vidmem.c \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
+	VTsw_noop.ln.c \
+	agp_noop.ln.c \
+	ioperm_noop.ln.c \
+	kmod_noop.ln.c \
+	pm_noop.ln.c \
+	vidmem.ln.c \
+	posix_tty.ln.c \
+	sigio.ln.c \
 	stub_bell.c \
 	stub_init.c \
 	stub_video.c
diff --git a/hw/xfree86/os-support/stub/VTsw_noop.ln.c b/hw/xfree86/os-support/stub/VTsw_noop.ln.c
new file mode 120000
index 000000000000..a263942c8c62
--- /dev/null
+++ b/hw/xfree86/os-support/stub/VTsw_noop.ln.c
@@ -0,0 +1 @@
+../shared/VTsw_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/agp_noop.ln.c b/hw/xfree86/os-support/stub/agp_noop.ln.c
new file mode 120000
index 000000000000..dd63e3713c74
--- /dev/null
+++ b/hw/xfree86/os-support/stub/agp_noop.ln.c
@@ -0,0 +1 @@
+../shared/agp_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/ioperm_noop.ln.c b/hw/xfree86/os-support/stub/ioperm_noop.ln.c
new file mode 120000
index 000000000000..a0f2d09dc5c0
--- /dev/null
+++ b/hw/xfree86/os-support/stub/ioperm_noop.ln.c
@@ -0,0 +1 @@
+../shared/ioperm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/kmod_noop.ln.c b/hw/xfree86/os-support/stub/kmod_noop.ln.c
new file mode 120000
index 000000000000..86a8c13ed052
--- /dev/null
+++ b/hw/xfree86/os-support/stub/kmod_noop.ln.c
@@ -0,0 +1 @@
+../shared/kmod_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/pm_noop.ln.c b/hw/xfree86/os-support/stub/pm_noop.ln.c
new file mode 120000
index 000000000000..2b99c7696af5
--- /dev/null
+++ b/hw/xfree86/os-support/stub/pm_noop.ln.c
@@ -0,0 +1 @@
+../shared/pm_noop.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/posix_tty.ln.c b/hw/xfree86/os-support/stub/posix_tty.ln.c
new file mode 120000
index 000000000000..74c31e0ffb06
--- /dev/null
+++ b/hw/xfree86/os-support/stub/posix_tty.ln.c
@@ -0,0 +1 @@
+../shared/posix_tty.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/sigio.ln.c b/hw/xfree86/os-support/stub/sigio.ln.c
new file mode 120000
index 000000000000..5d3a016889a7
--- /dev/null
+++ b/hw/xfree86/os-support/stub/sigio.ln.c
@@ -0,0 +1 @@
+../shared/sigio.c
\ No newline at end of file
diff --git a/hw/xfree86/os-support/stub/vidmem.ln.c b/hw/xfree86/os-support/stub/vidmem.ln.c
new file mode 120000
index 000000000000..8da4c69f88d9
--- /dev/null
+++ b/hw/xfree86/os-support/stub/vidmem.ln.c
@@ -0,0 +1 @@
+../shared/vidmem.c
\ No newline at end of file
diff --git a/hw/xfree86/utils/cvt/Makefile.am b/hw/xfree86/utils/cvt/Makefile.am
index 26abeb40be9a..d7248feb77f7 100644
--- a/hw/xfree86/utils/cvt/Makefile.am
+++ b/hw/xfree86/utils/cvt/Makefile.am
@@ -29,7 +29,7 @@ AM_CPPFLAGS = $(XORG_INCS) \
 
 # gah
 cvt_SOURCES = cvt.c \
-	$(top_srcdir)/hw/xfree86/modes/xf86cvt.c \
-	$(top_srcdir)/os/xprintf.c
+	xf86cvt.ln.c \
+	xprintf.ln.c
 
 cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/hw/xfree86/utils/cvt/xf86cvt.ln.c b/hw/xfree86/utils/cvt/xf86cvt.ln.c
new file mode 120000
index 000000000000..ce6a8f4a1e2a
--- /dev/null
+++ b/hw/xfree86/utils/cvt/xf86cvt.ln.c
@@ -0,0 +1 @@
+../../modes/xf86cvt.c
\ No newline at end of file
diff --git a/hw/xfree86/utils/cvt/xprintf.ln.c b/hw/xfree86/utils/cvt/xprintf.ln.c
new file mode 120000
index 000000000000..7024cb7af8af
--- /dev/null
+++ b/hw/xfree86/utils/cvt/xprintf.ln.c
@@ -0,0 +1 @@
+../../../../os/xprintf.c
\ No newline at end of file
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index eb550c0f7d67..58af1ddcb3f0 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -41,7 +41,7 @@ SRCS =	Args.c \
 	XNPixmap.h \
 	XNWindow.h \
 	xnest-config.h \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.ln.c
 
 XNEST_LIBS = \
         @XNEST_LIBS@ \
diff --git a/hw/xnest/miinitext.ln.c b/hw/xnest/miinitext.ln.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xnest/miinitext.ln.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 5ccbe48917bc..176eafd3d770 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -20,7 +20,7 @@ SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man
 DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man
 
 libXquartz_la_SOURCES = \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.ln.c \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 77962b14d19c..76dcbabd733f 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -16,7 +16,7 @@ dist_X11_bin_SOURCES = \
 # with the case where we build on Lion but target Snow Leopard as the minimum
 # OS version.
 #if NEED_STRNDUP
-dist_X11_bin_SOURCES += $(top_srcdir)/os/strndup.c
+dist_X11_bin_SOURCES += strndup.ln.c
 #endif
 
 nodist_X11_bin_SOURCES = \
diff --git a/hw/xquartz/mach-startup/strndup.ln.c b/hw/xquartz/mach-startup/strndup.ln.c
new file mode 120000
index 000000000000..cef9d580f3d7
--- /dev/null
+++ b/hw/xquartz/mach-startup/strndup.ln.c
@@ -0,0 +1 @@
+../../../os/strndup.c
\ No newline at end of file
diff --git a/hw/xquartz/miinitext.ln.c b/hw/xquartz/miinitext.ln.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xquartz/miinitext.ln.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am
index a3c9fce48226..cfa72106b9c6 100644
--- a/hw/xwayland/Makefile.am
+++ b/hw/xwayland/Makefile.am
@@ -18,9 +18,9 @@ Xwayland_SOURCES =				\
 	xwayland-cvt.c				\
 	xwayland-vidmode.c			\
 	xwayland.h				\
-	$(top_srcdir)/Xext/dpmsstubs.c		\
-	$(top_srcdir)/Xi/stubs.c		\
-	$(top_srcdir)/mi/miinitext.c
+	dpmsstubs.ln.c				\
+	stubs.ln.c				\
+	miinitext.ln.c
 
 Xwayland_LDADD =				\
 	$(glamor_lib)				\
diff --git a/hw/xwayland/dpmsstubs.ln.c b/hw/xwayland/dpmsstubs.ln.c
new file mode 120000
index 000000000000..ae4697ed2855
--- /dev/null
+++ b/hw/xwayland/dpmsstubs.ln.c
@@ -0,0 +1 @@
+../../Xext/dpmsstubs.c
\ No newline at end of file
diff --git a/hw/xwayland/miinitext.ln.c b/hw/xwayland/miinitext.ln.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xwayland/miinitext.ln.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/hw/xwayland/stubs.ln.c b/hw/xwayland/stubs.ln.c
new file mode 120000
index 000000000000..71a6c8864c24
--- /dev/null
+++ b/hw/xwayland/stubs.ln.c
@@ -0,0 +1 @@
+../../Xi/stubs.c
\ No newline at end of file
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 0846230b00b2..794867378988 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -112,7 +112,7 @@ SRCS =	InitInput.c \
 	windisplay.c \
 	windisplay.h \
 	XWin.rc \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.ln.c \
 	$(SRCS_CLIPBOARD) \
 	$(SRCS_MULTIWINDOW) \
 	$(SRCS_MULTIWINDOWEXTWM) \
diff --git a/hw/xwin/miinitext.ln.c b/hw/xwin/miinitext.ln.c
new file mode 120000
index 000000000000..32f438c79434
--- /dev/null
+++ b/hw/xwin/miinitext.ln.c
@@ -0,0 +1 @@
+../../mi/miinitext.c
\ No newline at end of file
diff --git a/test/miinitext.ln.c b/test/miinitext.ln.c
new file mode 120000
index 000000000000..7fe401c4c5ac
--- /dev/null
+++ b/test/miinitext.ln.c
@@ -0,0 +1 @@
+../mi/miinitext.c
\ No newline at end of file
-- 
2.9.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to