From 378d9688e66afc15a4b2484b1407cfdcbbfe80e8 Mon Sep 17 00:00:00 2001 From: Simon McVittie <simon.mcvittie@collabora.co.uk> Date: Mon, 18 Jan 2016 17:25:35 +0000 Subject: [PATCH] build: use correct CPPFLAGS for out-of-tree build Generated headers need to be included from the $(builddir). Also remove unnecessary indirection: AM_CPPFLAGS is used for all targets that do not have their own foo_CPPFLAGS. Refs T770, similar to D1571 and D1613. Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D1646 --- src/Makefile.am | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 521b322..3b06d44 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,9 +1,11 @@ includesfidir = $(includedir)/prestwood -includes= \ - -I$(top_srcdir)\ - -I$(top_srcdir)/interface/ \ - $(NULL) +AM_CPPFLAGS = \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/interface \ + -I$(top_builddir)/interface \ + $(NULL) source_c = prestwood-main.c \ prestwood.c @@ -14,9 +16,6 @@ includesfi_HEADERS = prestwood.h bin_PROGRAMS = prestwood -prestwood_CPPFLAGS = $(includes) \ - $(AM_CPPFLAGS) - prestwood_LDADD = \ $(GLIB_LIBS) $(GUPNP_LIBS) $(GSSDP_LIBS)\ $(CANTERBURY_LIBS) $(CODE_COVERAGE_LIBS) $(AM_LIBADD) \ -- GitLab