[libbluray-devel] build: use AM_CPPFLAGS

hpi1 git at videolan.org
Thu May 4 11:08:19 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu May  4 12:00:15 2017 +0300| [11ddbb1783350eb0d5df8850f30c42066ff8f028] | committer: hpi1

build: use AM_CPPFLAGS

Fixes include path order when CPPFLAGS is given in make command line.
(old/installed bluray.h was included when building in VLC contrib).

Limit include paths when building tools.

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

 Makefile.am | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 05d5b20a..be16d0d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,11 +11,6 @@ else
 POSIX_C_SOURCE=200112L
 endif
 
-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=$(POSIX_C_SOURCE) -D_REENTRANT
-SET_INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libbluray -I$(top_builddir)/src/libbluray $(BDJAVA_CFLAGS)
-
-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(UDF_CFLAGS)
-
 EXTRA_DIST = \
 	bootstrap \
 	ChangeLog \
@@ -29,7 +24,26 @@ EXTRA_DIST = \
 	src/libbluray/bdj/java-j2se \
 	contrib/asm
 
+AM_CFLAGS = \
+	-std=c99
+
+AM_CPPFLAGS = \
+	-D_ISOC99_SOURCE \
+	-D_POSIX_C_SOURCE=$(POSIX_C_SOURCE) \
+	-D_REENTRANT \
+	\
+	-I$(top_srcdir)/src \
+	-I$(top_srcdir)/src/libbluray
+
 lib_LTLIBRARIES=libbluray.la
+libbluray_la_CPPFLAGS = \
+	$(AM_CPPFLAGS) \
+	-I$(top_builddir)/src/libbluray \
+	$(BDJAVA_CFLAGS) \
+	$(UDF_CFLAGS) \
+	$(LIBXML2_CFLAGS) \
+	$(FT2_CFLAGS) \
+	$(FONTCONFIG_CFLAGS)
 libbluray_la_SOURCES = \
 	src/file/dirs.h \
 	src/file/dl.h \



More information about the libbluray-devel mailing list