libdrm, freedreno, intel, nouveau, radeon: add Makefile.sources

Will be used to consolidate the required sources lists as well as the
install-able headers. This is turn will help us to avoid the
duplication with the upcoming Android build support.

v2: Rename the headers variable to *_H_FILES.
v3: Rebase on top of symbol visibility patches.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
main
Emil Velikov 2014-08-24 19:26:14 +01:00
parent 02b3ad7e19
commit 4255d3d51d
12 changed files with 120 additions and 84 deletions

View File

@ -18,6 +18,8 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
include Makefile.sources
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
pkgconfigdir = @pkgconfigdir@ pkgconfigdir = @pkgconfigdir@
@ -62,18 +64,10 @@ libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm
AM_CFLAGS = \ AM_CFLAGS = \
$(VALGRIND_CFLAGS) $(VALGRIND_CFLAGS)
libdrm_la_SOURCES = \ libdrm_la_SOURCES = $(LIBDRM_FILES)
xf86drm.c \
xf86drmHash.c \
xf86drmRandom.c \
xf86drmSL.c \
xf86drmMode.c \
xf86atomic.h \
libdrm.h \
libdrm_lists.h
libdrmincludedir = ${includedir} libdrmincludedir = ${includedir}
libdrminclude_HEADERS = xf86drm.h xf86drmMode.h libdrminclude_HEADERS = $(LIBDRM_H_FILES)
EXTRA_DIST = libdrm.pc.in include/drm/* EXTRA_DIST = libdrm.pc.in include/drm/*

13
Makefile.sources Normal file
View File

@ -0,0 +1,13 @@
LIBDRM_FILES := \
xf86drm.c \
xf86drmHash.c \
xf86drmRandom.c \
xf86drmSL.c \
xf86drmMode.c \
xf86atomic.h \
libdrm.h \
libdrm_lists.h
LIBDRM_H_FILES := \
xf86drm.h \
xf86drmMode.h

View File

@ -1,4 +1,5 @@
AUTOMAKE_OPTIONS=subdir-objects AUTOMAKE_OPTIONS=subdir-objects
include Makefile.sources
AM_CFLAGS = \ AM_CFLAGS = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
@ -13,29 +14,10 @@ libdrm_freedreno_ladir = $(libdir)
libdrm_freedreno_la_LDFLAGS = -version-number 1:0:0 -no-undefined libdrm_freedreno_la_LDFLAGS = -version-number 1:0:0 -no-undefined
libdrm_freedreno_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ libdrm_freedreno_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
libdrm_freedreno_la_SOURCES = \ libdrm_freedreno_la_SOURCES = $(LIBDRM_FREEDRENO_FILES)
freedreno_device.c \
freedreno_pipe.c \
freedreno_priv.h \
freedreno_ringbuffer.c \
freedreno_bo.c \
kgsl/kgsl_bo.c \
kgsl/kgsl_device.c \
kgsl/kgsl_drm.h \
kgsl/kgsl_pipe.c \
kgsl/kgsl_priv.h \
kgsl/kgsl_ringbuffer.c \
kgsl/msm_kgsl.h \
msm/msm_bo.c \
msm/msm_device.c \
msm/msm_drm.h \
msm/msm_pipe.c \
msm/msm_priv.h \
msm/msm_ringbuffer.c \
list.h
libdrm_freedrenocommonincludedir = ${includedir}/freedreno libdrm_freedrenocommonincludedir = ${includedir}/freedreno
libdrm_freedrenocommoninclude_HEADERS = freedreno_drmif.h freedreno_ringbuffer.h libdrm_freedrenocommoninclude_HEADERS = $(LIBDRM_FREEDRENO_H_FILES)
pkgconfigdir = @pkgconfigdir@ pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_freedreno.pc pkgconfig_DATA = libdrm_freedreno.pc

View File

@ -0,0 +1,24 @@
LIBDRM_FREEDRENO_FILES := \
freedreno_device.c \
freedreno_pipe.c \
freedreno_priv.h \
freedreno_ringbuffer.c \
freedreno_bo.c \
kgsl/kgsl_bo.c \
kgsl/kgsl_device.c \
kgsl/kgsl_drm.h \
kgsl/kgsl_pipe.c \
kgsl/kgsl_priv.h \
kgsl/kgsl_ringbuffer.c \
kgsl/msm_kgsl.h \
msm/msm_bo.c \
msm/msm_device.c \
msm/msm_drm.h \
msm/msm_pipe.c \
msm/msm_priv.h \
msm/msm_ringbuffer.c \
list.h
LIBDRM_FREEDRENO_H_FILES := \
freedreno_drmif.h \
freedreno_ringbuffer.h

View File

@ -22,23 +22,11 @@
# however, r300 and via need their reg headers installed in order to build. # however, r300 and via need their reg headers installed in order to build.
# better solutions are welcome. # better solutions are welcome.
include Makefile.sources
klibdrmincludedir = ${includedir}/libdrm klibdrmincludedir = ${includedir}/libdrm
klibdrminclude_HEADERS = \ klibdrminclude_HEADERS = $(LIBDRM_INCLUDE_H_FILES)
drm.h \
drm_mode.h \
drm_fourcc.h \
drm_sarea.h \
i915_drm.h \
mga_drm.h \
nouveau_drm.h \
r128_drm.h \
radeon_drm.h \
savage_drm.h \
sis_drm.h \
via_drm.h \
mach64_drm.h \
qxl_drm.h
if HAVE_VMWGFX if HAVE_VMWGFX
klibdrminclude_HEADERS += vmwgfx_drm.h klibdrminclude_HEADERS += $(LIBDRM_INCLUDE_VMWGFX_H_FILES)
endif endif

View File

@ -0,0 +1,18 @@
LIBDRM_INCLUDE_H_FILES := \
drm.h \
drm_mode.h \
drm_fourcc.h \
drm_sarea.h \
i915_drm.h \
mga_drm.h \
nouveau_drm.h \
r128_drm.h \
radeon_drm.h \
savage_drm.h \
sis_drm.h \
via_drm.h \
mach64_drm.h \
qxl_drm.h
LIBDRM_INCLUDE_VMWGFX_H_FILES := \
vmwgfx_drm.h

View File

@ -22,6 +22,8 @@
# Authors: # Authors:
# Eric Anholt <eric@anholt.net> # Eric Anholt <eric@anholt.net>
include Makefile.sources
AM_CFLAGS = \ AM_CFLAGS = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(VISIBILITY_CFLAGS) \ $(VISIBILITY_CFLAGS) \
@ -40,22 +42,12 @@ libdrm_intel_la_LIBADD = ../libdrm.la \
@PCIACCESS_LIBS@ \ @PCIACCESS_LIBS@ \
@CLOCK_LIB@ @CLOCK_LIB@
libdrm_intel_la_SOURCES = \ libdrm_intel_la_SOURCES = $(LIBDRM_INTEL_FILES)
intel_bufmgr.c \
intel_bufmgr_priv.h \
intel_bufmgr_fake.c \
intel_bufmgr_gem.c \
intel_decode.c \
intel_chipset.h \
mm.c \
mm.h
intel_bufmgr_gem_o_CFLAGS = $(AM_CFLAGS) -c99 intel_bufmgr_gem_o_CFLAGS = $(AM_CFLAGS) -c99
libdrm_intelincludedir = ${includedir}/libdrm libdrm_intelincludedir = ${includedir}/libdrm
libdrm_intelinclude_HEADERS = intel_bufmgr.h \ libdrm_intelinclude_HEADERS = $(LIBDRM_INTEL_H_FILES)
intel_aub.h \
intel_debug.h
# This may be interesting even outside of "make check", due to the -dump option. # This may be interesting even outside of "make check", due to the -dump option.
noinst_PROGRAMS = test_decode noinst_PROGRAMS = test_decode

14
intel/Makefile.sources Normal file
View File

@ -0,0 +1,14 @@
LIBDRM_INTEL_FILES := \
intel_bufmgr.c \
intel_bufmgr_priv.h \
intel_bufmgr_fake.c \
intel_bufmgr_gem.c \
intel_decode.c \
intel_chipset.h \
mm.c \
mm.h
LIBDRM_INTEL_H_FILES := \
intel_bufmgr.h \
intel_aub.h \
intel_debug.h

View File

@ -1,3 +1,5 @@
include Makefile.sources
AM_CFLAGS = \ AM_CFLAGS = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(VISIBILITY_CFLAGS) \ $(VISIBILITY_CFLAGS) \
@ -12,15 +14,10 @@ libdrm_nouveau_ladir = $(libdir)
libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined
libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
libdrm_nouveau_la_SOURCES = nouveau.c \ libdrm_nouveau_la_SOURCES = $(LIBDRM_NOUVEAU_FILES)
pushbuf.c \
bufctx.c \
abi16.c \
private.h
libdrm_nouveauincludedir = ${includedir}/libdrm libdrm_nouveauincludedir = ${includedir}/libdrm
libdrm_nouveauinclude_HEADERS = nouveau.h libdrm_nouveauinclude_HEADERS = $(LIBDRM_NOUVEAU_H_FILES)
pkgconfigdir = @pkgconfigdir@ pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_nouveau.pc pkgconfig_DATA = libdrm_nouveau.pc

9
nouveau/Makefile.sources Normal file
View File

@ -0,0 +1,9 @@
LIBDRM_NOUVEAU_FILES := \
nouveau.c \
pushbuf.c \
bufctx.c \
abi16.c \
private.h
LIBDRM_NOUVEAU_H_FILES := \
nouveau.h

View File

@ -22,6 +22,8 @@
# Authors: # Authors:
# Jérôme Glisse <glisse@freedesktop.org> # Jérôme Glisse <glisse@freedesktop.org>
include Makefile.sources
AM_CFLAGS = \ AM_CFLAGS = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(VISIBILITY_CFLAGS) \ $(VISIBILITY_CFLAGS) \
@ -35,26 +37,10 @@ libdrm_radeon_ladir = $(libdir)
libdrm_radeon_la_LDFLAGS = -version-number 1:0:1 -no-undefined libdrm_radeon_la_LDFLAGS = -version-number 1:0:1 -no-undefined
libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
libdrm_radeon_la_SOURCES = \ libdrm_radeon_la_SOURCES = $(LIBDRM_RADEON_FILES)
radeon_bo_gem.c \
radeon_cs_gem.c \
radeon_cs_space.c \
radeon_bo.c \
radeon_cs.c \
radeon_surface.c \
bof.c \
bof.h
libdrm_radeonincludedir = ${includedir}/libdrm libdrm_radeonincludedir = ${includedir}/libdrm
libdrm_radeoninclude_HEADERS = \ libdrm_radeoninclude_HEADERS = $(LIBDRM_RADEON_H_FILES)
radeon_bo.h \
radeon_cs.h \
radeon_surface.h \
radeon_bo_gem.h \
radeon_cs_gem.h \
radeon_bo_int.h \
radeon_cs_int.h \
r600_pci_ids.h
pkgconfigdir = @pkgconfigdir@ pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_radeon.pc pkgconfig_DATA = libdrm_radeon.pc

19
radeon/Makefile.sources Normal file
View File

@ -0,0 +1,19 @@
LIBDRM_RADEON_FILES := \
radeon_bo_gem.c \
radeon_cs_gem.c \
radeon_cs_space.c \
radeon_bo.c \
radeon_cs.c \
radeon_surface.c \
bof.c \
bof.h
LIBDRM_RADEON_H_FILES := \
radeon_bo.h \
radeon_cs.h \
radeon_surface.h \
radeon_bo_gem.h \
radeon_cs_gem.h \
radeon_bo_int.h \
radeon_cs_int.h \
r600_pci_ids.h