aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2021-05-23 13:08:56 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2021-05-23 13:11:43 +0200
commit24b320fe020e78b1d1693b73dcc339afc48c9b18 (patch)
tree920b16604fd1700a07d33b3b450fcdd5445592e2
parentbae368d5063e81563bce2353fbcec0d29b2ebc6c (diff)
downloadpsmq-24b320fe020e78b1d1693b73dcc339afc48c9b18.tar.gz
psmq-24b320fe020e78b1d1693b73dcc339afc48c9b18.tar.bz2
psmq-24b320fe020e78b1d1693b73dcc339afc48c9b18.zip
Makefile.am: add $(top_builddir)/inc include
After not distributing psmq.h this file is generated in _build directory. And while compilation works, when project is build out of tree in separate directory, compiler can't find psmq.h as it looks for it in $(top_srcdir) and generated file is in $(top_builddir) Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r--lib/Makefile.am3
-rw-r--r--src/Makefile.am2
-rw-r--r--tst/Makefile.am1
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 204a0e3..03d416c 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -12,7 +12,8 @@ libpsmq_la_LDFLAGS = $(COVERAGE_LDFLAGS) \
# | `- increment if source code has changed
# | set to zero if current is incremented
# `- increment if interfaces have been added, removed or changed
-libpsmq_la_CFLAGS = $(COVERAGE_CFLAGS) -I$(top_srcdir)/inc -I$(top_srcdir)
+libpsmq_la_CFLAGS = $(COVERAGE_CFLAGS) -I$(top_srcdir)/inc -I$(top_srcdir) \
+ -I$(top_builddir)/inc
# static code analyzer
diff --git a/src/Makefile.am b/src/Makefile.am
index 7a14d33..77a54c3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ psmqp_source = psmq-pub.c
psmq_headers = cfg.h broker.h globals.h topic-list.h $(top_srcdir)/valid.h \
$(top_srcdir)/psmq-common.h
-bin_cflags = $(COVERAGE_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/inc
+bin_cflags = $(COVERAGE_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/inc -I$(top_builddir)/inc
bin_ldflags = $(COVERAGE_LDFLAGS)
if ENABLE_STANDALONE
diff --git a/tst/Makefile.am b/tst/Makefile.am
index 389db9b..be4e0a5 100644
--- a/tst/Makefile.am
+++ b/tst/Makefile.am
@@ -8,6 +8,7 @@ psmqd_test_SOURCES = $(psmqd_test_source) $(psmqd_test_header)
psmqd_test_CFLAGS = -I$(top_srcdir)/inc \
-I$(top_srcdir)/src \
-I$(top_srcdir) \
+ -I$(top_builddir)/inc \
$(COVERAGE_CFLAGS)
psmqd_test_LDFLAGS = $(COVERAGE_LDFLAGS) -static