summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-01-10 22:40:47 +0100
committerAleksander Morgado <aleksander@aleksander.es>2018-01-10 22:40:56 +0100
commit0cee0bdf6d9b1d5bf03c6310294369a9de159038 (patch)
tree67a9334f886154f5d5a26028159f69a2fc67290b
parentcc8587fa012aa6f65e6c47a5a2b8e37d79a9c004 (diff)
build: don't build qmicli-helpers twice
Build them once in a single non-inst library.
-rw-r--r--src/qmicli/Makefile.am21
-rw-r--r--src/qmicli/test/Makefile.am5
2 files changed, 20 insertions, 6 deletions
diff --git a/src/qmicli/Makefile.am b/src/qmicli/Makefile.am
index 1d701ad..f3873c9 100644
--- a/src/qmicli/Makefile.am
+++ b/src/qmicli/Makefile.am
@@ -1,6 +1,23 @@
SUBDIRS = . test
+noinst_LTLIBRARIES = libhelpers.la
+
+libhelpers_la_CPPFLAGS = \
+ $(GLIB_CFLAGS) \
+ $(MBIM_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/libqmi-glib \
+ -I$(top_srcdir)/src/libqmi-glib/generated \
+ -I$(top_builddir)/src/libqmi-glib \
+ -I$(top_builddir)/src/libqmi-glib/generated \
+ $(NULL)
+
+libhelpers_la_SOURCES = \
+ qmicli-helpers.c \
+ qmicli-helpers.h \
+ $(NULL)
+
bin_PROGRAMS = qmicli
qmicli_CPPFLAGS = \
@@ -15,8 +32,6 @@ qmicli_CPPFLAGS = \
qmicli_SOURCES = \
qmicli.c \
qmicli.h \
- qmicli-helpers.c \
- qmicli-helpers.h \
qmicli-dms.c \
qmicli-wds.c \
qmicli-nas.c \
@@ -32,9 +47,9 @@ qmicli_SOURCES = \
qmicli_LDADD = \
$(MBIM_LIBS) \
$(GLIB_LIBS) \
+ libhelpers.la \
$(top_builddir)/src/libqmi-glib/libqmi-glib.la
-
completiondir = $(datadir)/bash-completion/completions
install-data-hook:
diff --git a/src/qmicli/test/Makefile.am b/src/qmicli/test/Makefile.am
index b07281e..01dd311 100644
--- a/src/qmicli/test/Makefile.am
+++ b/src/qmicli/test/Makefile.am
@@ -6,9 +6,7 @@ noinst_PROGRAMS = \
TEST_PROGS += $(noinst_PROGRAMS)
test_helpers_SOURCES = \
- test-helpers.c \
- $(top_srcdir)/src/qmicli/qmicli-helpers.h \
- $(top_srcdir)/src/qmicli/qmicli-helpers.c
+ test-helpers.c
test_helpers_CPPFLAGS = \
$(GLIB_CFLAGS) \
@@ -21,4 +19,5 @@ test_helpers_CPPFLAGS = \
test_helpers_LDADD = \
$(GLIB_LIBS) \
+ $(top_builddir)/src/qmicli/libhelpers.la \
$(top_builddir)/src/libqmi-glib/libqmi-glib.la