diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2021-05-23 13:08:56 +0200 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2021-05-23 13:11:43 +0200 |
commit | 24b320fe020e78b1d1693b73dcc339afc48c9b18 (patch) | |
tree | 920b16604fd1700a07d33b3b450fcdd5445592e2 | |
parent | bae368d5063e81563bce2353fbcec0d29b2ebc6c (diff) | |
download | psmq-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.am | 3 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | tst/Makefile.am | 1 |
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 |