shithub: libdvdcss

Download patch

ref: ee2b1c28e2b36e0c9fb0a8bd06d948bd4aae8ddf
parent: 078b6df43b0482264defa2d2beeb9158e89b2da1
author: Diego Elio Pettenò <flameeyes@flameeyes.eu>
date: Wed Feb 13 12:36:48 EST 2013

build: get rid of recursion for building the library and the csstest program.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
 *.pc
 .auto
 .deps
+.dirstamp
 .libs
 Makefile
 Makefile.in
@@ -19,6 +20,8 @@
 config.status
 config.sub
 configure
+csstest
+depcomp
 doc/doxygen.cfg
 doc/html
 doc/latex
@@ -27,4 +30,3 @@
 ltmain.sh
 missing
 stamp-*
-test/csstest
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src test doc
+SUBDIRS = doc
 
 EXTRA_DIST = libdvdcss.spec bootstrap
 
@@ -7,3 +7,45 @@
 doc: doc-dummy
 	$(MAKE) -C doc
 
+lib_LTLIBRARIES = libdvdcss.la
+EXTRA_PROGRAMS = csstest
+
+libdvdcss_la_SOURCES = \
+	src/libdvdcss.c \
+	src/libdvdcss.h \
+	src/device.c \
+	src/device.h \
+	src/css.c \
+	src/css.h \
+	src/csstables.h \
+	src/ioctl.c \
+	src/ioctl.h \
+	src/error.c \
+	src/common.h
+
+libdvdcss_la_LDFLAGS = -version-info 3:0:1 $(DVDCSS_LDFLAGS)
+libdvdcss_la_LIBADD =
+
+if SYS_BSDI
+libdvdcss_la_SOURCES += \
+	src/bsdi_ioctl.c \
+	src/bsdi_dvd.h
+endif
+
+if SYS_BSDI_LIBDVD
+libdvdcss_la_LIBADD += -ldvd
+endif
+
+if !SYS_MSVC
+libdvdcss_la_LDFLAGS += = -no-undefined
+endif
+
+csstest_SOURCES = test/csstest.c
+csstest_LDADD = libdvdcss.la
+csstest_CFLAGS = -I $(top_srcdir)/src
+
+pkgincludedir = $(includedir)/dvdcss
+pkginclude_HEADERS = src/dvdcss/dvdcss.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = src/libdvdcss.pc
--- a/configure.ac
+++ b/configure.ac
@@ -211,9 +211,6 @@
 AC_OUTPUT([
   Makefile
   doc/Makefile
-  src/Makefile
-  src/dvdcss/Makefile
-  test/Makefile
   src/libdvdcss.pc
 ])
 
--- a/src/Makefile.am
+++ /dev/null
@@ -1,37 +1,0 @@
-SUBDIRS = dvdcss
-
-lib_LTLIBRARIES = libdvdcss.la
-
-libdvdcss_la_SOURCES = \
-	libdvdcss.c libdvdcss.h \
-	device.c device.h \
-	css.c css.h csstables.h \
-	ioctl.c ioctl.h \
-	error.c \
-	common.h \
-	$(bsdi_sources)
-
-EXTRA_libdvdcss_la_SOURCES = \
-	$(bsdi_extras)
-
-libdvdcss_la_LIBADD = $(bsdi_libadd)
-libdvdcss_la_LDFLAGS = -version-info 3:0:1 $(libtool_flags) @DVDCSS_LDFLAGS@
-
-bsdi_extras = bsdi_ioctl.c bsdi_dvd.h
-
-if SYS_BSDI
-bsdi_sources = $(bsdi_extras)
-endif
-
-if SYS_BSDI_LIBDVD
-bsdi_libadd = -ldvd
-endif
-
-if SYS_MSVC
-else
-libtool_flags = -no-undefined
-endif
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libdvdcss.pc
-
--- a/src/dvdcss/Makefile.am
+++ /dev/null
@@ -1,3 +1,0 @@
-pkgincludedir = $(includedir)/dvdcss
-
-pkginclude_HEADERS = dvdcss.h
--- a/test/Makefile.am
+++ /dev/null
@@ -1,15 +1,0 @@
-
-noinst_PROGRAMS = csstest #dvd_region
-
-csstest_SOURCES = csstest.c
-csstest_LDADD = $(top_builddir)/src/libdvdcss.la $(bsdi_libadd)
-csstest_CFLAGS = -I$(top_srcdir)/src
-
-#dvd_region_SOURCES = dvd_region.c
-#dvd_region_LDADD = $(top_builddir)/src/libdvdcss.la
-#dvd_region_CFLAGS = -I$(top_srcdir)/src
-
-if SYS_BSDI_LIBDVD
-bsdi_libadd = -ldvd
-endif
-