[libbluray-devel] build: merge src/examples/Makefile.am to src/Makefile.am

hpi1 git at videolan.org
Wed Oct 9 11:45:31 CEST 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Oct  9 12:38:54 2013 +0300| [98fa6ab2b809955bea5f31022438deb2ca1d6b82] | committer: hpi1

build: merge src/examples/Makefile.am to src/Makefile.am

Based on Diego Elio Pettenò's patch

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=98fa6ab2b809955bea5f31022438deb2ca1d6b82
---

 .gitignore               |   25 ++++++------
 Makefile.am              |    3 --
 configure.ac             |    5 ++-
 src/Makefile.am          |   99 ++++++++++++++++++++++++++++++++++++++++++++++
 src/examples/Makefile.am |   91 ------------------------------------------
 5 files changed, 115 insertions(+), 108 deletions(-)

diff --git a/.gitignore b/.gitignore
index c269f63..6c32d15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,20 +20,21 @@ config.log
 config.status
 configure
 libtool
+.dirstamp
 .deps
 .libs
 src/libbluray/bluray-version.h
-src/examples/bdsplice
-src/examples/clpi_dump
-src/examples/index_dump
-src/examples/libbluray_test
-src/examples/list_titles
-src/examples/mobj_dump
-src/examples/mpls_dump
-src/examples/sound_dump
-src/examples/bdj_test
-src/examples/bd_info
-src/examples/hdmv_test
-src/examples/*.exe
+bdsplice
+clpi_dump
+index_dump
+libbluray_test
+list_titles
+mobj_dump
+mpls_dump
+sound_dump
+bdj_test
+bd_info
+hdmv_test
+*.exe
 src/libbluray/bdj/build
 stamp-h1
diff --git a/Makefile.am b/Makefile.am
index 859a1f4..197ba01 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,6 @@
 include $(top_srcdir)/doxygen-include.am
 
 SUBDIRS = src
-if USING_EXAMPLES
-SUBDIRS += src/examples
-endif
 
 ACLOCAL_AMFLAGS=-I m4
 
diff --git a/configure.ac b/configure.ac
index 0d1f583..7bf3ff1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ AC_INIT([libbluray], bluray_version, [http://www.videolan.org/developers/libblur
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE([foreign tar-ustar dist-bzip2 no-dist-gzip])
+AM_INIT_AUTOMAKE([foreign tar-ustar dist-bzip2 no-dist-gzip subdir-objects])
 AC_CONFIG_HEADERS(config.h)
 
 case "${host_os}" in
@@ -100,6 +100,7 @@ AC_ARG_WITH([bdj-bootclasspath],
 
 dnl required programs
 AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 
 dnl required types
@@ -226,7 +227,7 @@ AC_SUBST(LT_VERSION_INFO)
 
 dnl generate output files
 AC_SUBST(BDJAVA_CFLAGS)
-AC_CONFIG_FILES([Makefile src/Makefile src/examples/Makefile src/libbluray.pc src/libbluray/bluray-version.h])
+AC_CONFIG_FILES([Makefile src/Makefile src/libbluray.pc src/libbluray/bluray-version.h])
 AC_OUTPUT
 
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 76f62eb..a760e66 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -166,3 +166,102 @@ endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libbluray.pc
+
+
+#
+# examples
+#
+
+#SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT
+#SET_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/file -I$(top_srcdir)/src/libbluray/bdnav
+
+if USING_EXAMPLES
+
+#AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES)
+
+noinst_PROGRAMS = \
+	bdsplice \
+	clpi_dump \
+	hdmv_test \
+	index_dump \
+	libbluray_test \
+	list_titles \
+	mobj_dump \
+	mpls_dump \
+	sound_dump
+
+if USING_BDJAVA
+noinst_PROGRAMS += \
+	bdj_test
+endif
+
+bin_PROGRAMS = \
+	bd_info
+
+bdsplice_SOURCES = examples/bdsplice.c
+bdsplice_LDADD = libbluray.la
+
+mpls_dump_CFLAGS = $(AM_CFLAGS)
+mpls_dump_SOURCES = \
+	examples/mpls_dump.c \
+	examples/util.c \
+	examples/util.h \
+	file/file_posix.c \
+	libbluray/bdnav/clpi_parse.c \
+	libbluray/bdnav/extdata_parse.c \
+	libbluray/bdnav/mpls_parse.c \
+	libbluray/bdnav/navigation.c \
+	util/bits.c \
+	util/logging.c \
+	util/strutl.c
+if HAVE_WIN32
+mpls_dump_SOURCES += \
+	file/dir_win32.c
+else
+mpls_dump_SOURCES += \
+	file/dir_posix.c
+endif
+
+clpi_dump_CFLAGS = $(AM_CFLAGS)
+clpi_dump_SOURCES = \
+	examples/clpi_dump.c \
+	examples/util.c \
+	examples/util.h
+clpi_dump_LDADD = libbluray.la
+
+index_dump_CFLAGS = $(AM_CFLAGS)
+index_dump_SOURCES = \
+	examples/index_dump.c \
+	file/file_posix.c \
+	libbluray/bdnav/index_parse.c \
+	util/bits.c \
+	util/logging.c
+
+mobj_dump_CFLAGS = $(AM_CFLAGS)
+mobj_dump_SOURCES = \
+	examples/mobj_dump.c \
+	file/file_posix.c \
+	libbluray/hdmv/mobj_parse.c \
+	libbluray/hdmv/mobj_print.c \
+	util/bits.c \
+	util/logging.c
+
+sound_dump_SOURCES = examples/sound_dump.c
+sound_dump_LDADD = libbluray.la
+
+libbluray_test_SOURCES = examples/libbluray_test.c
+libbluray_test_LDADD = libbluray.la
+
+hdmv_test_SOURCES = examples/hdmv_test.c
+hdmv_test_LDADD = libbluray.la
+
+list_titles_SOURCES = examples/list_titles.c
+list_titles_LDADD = libbluray.la
+
+bd_info_SOURCES = examples/bd_info.c
+bd_info_LDADD = libbluray.la
+
+bdj_test_SOURCES = examples/bdj_test.c
+bdj_test_LDADD = libbluray.la
+
+endif
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
deleted file mode 100644
index fa40954..0000000
--- a/src/examples/Makefile.am
+++ /dev/null
@@ -1,91 +0,0 @@
-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT
-SET_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/file -I$(top_srcdir)/src/libbluray/bdnav
-
-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES)
-
-if USING_EXAMPLES
-
-noinst_PROGRAMS=bdsplice mpls_dump clpi_dump index_dump mobj_dump sound_dump \
-    libbluray_test list_titles hdmv_test
-bin_PROGRAMS=bd_info
-
-BLURAY_LIB = $(top_builddir)/src/libbluray.la
-
-if USING_BDJAVA
-  AM_CFLAGS += @BDJAVA_CFLAGS@
-endif
-
-bdsplice_SOURCES = \
-	bdsplice.c
-
-bdsplice_LDADD = $(BLURAY_LIB)
-
-mpls_dump_SOURCES = \
-	mpls_dump.c util.c util.h \
-	../util/bits.c \
-	../util/strutl.c \
-	../util/logging.c \
-	../file/file_posix.c \
-	../libbluray/bdnav/extdata_parse.c \
-	../libbluray/bdnav/mpls_parse.c \
-	../libbluray/bdnav/clpi_parse.c \
-	../libbluray/bdnav/navigation.c
-
-if HAVE_WIN32
-mpls_dump_SOURCES += \
-	../file/dir_win32.c
-else
-mpls_dump_SOURCES += \
-	../file/dir_posix.c
-endif
-
-clpi_dump_SOURCES = \
-	clpi_dump.c util.c util.h
-clpi_dump_LDADD = $(BLURAY_LIB)
-
-sound_dump_SOURCES = \
-	sound_dump.c
-sound_dump_LDADD = $(BLURAY_LIB)
-
-index_dump_SOURCES = \
-	index_dump.c \
-	../util/bits.c \
-	../util/logging.c \
-	../file/file_posix.c \
-	../libbluray/bdnav/index_parse.c
-
-mobj_dump_SOURCES = \
-	mobj_dump.c \
-	../util/bits.c \
-	../util/logging.c \
-	../file/file_posix.c \
-	../libbluray/hdmv/mobj_parse.c \
-	../libbluray/hdmv/mobj_print.c
-
-libbluray_test_SOURCES = \
-	libbluray_test.c
-
-libbluray_test_LDADD = $(BLURAY_LIB)
-
-hdmv_test_SOURCES = \
-	hdmv_test.c
-
-hdmv_test_LDADD = $(BLURAY_LIB)
-
-list_titles_SOURCES = \
-	list_titles.c
-
-list_titles_LDADD = $(BLURAY_LIB)
-
-bd_info_SOURCES = \
-	bd_info.c
-
-bd_info_LDADD = $(BLURAY_LIB)
-
-if USING_BDJAVA
-noinst_PROGRAMS+= bdj_test
-bdj_test_SOURCES = bdj_test.c
-bdj_test_LDADD = $(BLURAY_LIB)
-endif
-
-endif



More information about the libbluray-devel mailing list