dri/common: move source file lists to Makefile.sources

* Allow the lists to be shared among build systems.
* Update automake and Android build systems.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
st/xvmc: enable automake subdir-objects

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
r300: add symlink to ralloc.c and register_allocate.c

Make automake's subdir-objects work.
Update includes.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
r300: move the final sources list to Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
gallium/drivers: enable automake subdir-objects

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/r300: move drm_target.c to common folder

... and symlink for each target.
Make automake's subdir-objects work for r300.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/r600: move drm_target.c to common folder

... and symlink for each target.
Make automake's subdir-objects work for r600.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/radeonsi: move drm_target.c to a common folder

... and symlink to each target.
Make automake's subdir-objects work for radeonsi.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
gallium/drivers: compact compiler flags into Automake.inc

* minimise flags duplication
* distingush between VISIBILITY C and CXX flags
* set only required flags - C and/or CXX

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/vdpau: compact compiler flags into Automake.inc

Store the compiler flags into a variable, in order to minimise
flags duplication (amongst vdpau and xvmc).

Note: this commit add VISIBILITY_CFLAGS to the nouveau target

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/vdpau: move linker flags to Automake.inc

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/vdpau: consolidate lib deps into Automake.inc

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/vdpau: drop unused libraries from linker

In order for one to use trace, noop, rbug and/or galahad, they must
set the corresponding GALLIUM_* CFLAG.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
gallium/winsys: compact compiler flags into Automake.inc

Cleanup the duplicating flags and consolidate into a sigle variable.

Note: this patch adds VISIBILITY_CFLAGS to the following targets
* freedreno/drm
* i915/{drm,sw}
* nouveau/drm
* sw/fbdev
* sw/null
* sw/wayland
* sw/wrapper
* sw/xlib

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/xvmc: use drop duplicated compiler flags

Automake.inc already has GALLIUM_VIDEO_CFLAGS, which
provide the essential compiler flags needed.

Note: this commit adds VISIBILITY_CFLAGS to nouveau.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/xvmc: move linker flags to Automake.inc

Minimise duplication and sources of error
(eg nouveau was missing shared and no-undefined)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/xvmc: consolidate lib deps into Automake.inc

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/xvmc: do not link against libtrace.la

In order to use the trace driver, one needs to define
GALLIUM_TRACE. Neither one of the two targets was
defining it, thus we're safe to remove libtrace.la.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/dri: compact compiler flags into Automake.inc

Greatly reduce duplication and provide a sane minimum of
CFLAGS for all DRI targets.

Note: This commit adds VISIBILITY_CFLAGS to the following:
* freedreno
* i915
* ilo
* nouveau
* vmwgfx

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/dri: move linker flags out of configure into Automake.inc

Previous assumption was that the same set of flags can be reused
for both classic and gallium drivers. With megadriver work done
the classic drivers ended up using their own (single) instance of
the flags.

Move these into Automake.inc and rename to indicate that those
are gallium specific. Additionally silence an automake/autoconf
warning "XXX is not a standard libtool library name", due to
the parsing issues of the module tag.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>