fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/43857?usp=email )
Change subject: osmocon: fix make distcheck: symlink firmware files ......................................................................
osmocon: fix make distcheck: symlink firmware files
Relative paths to the firmware related files do not work when building out of the source tree (e.g. during distcheck). Let's symlink the necessary files instead, like we already do in trxcon.
Change-Id: I4566d907642375f72ae98a37e0b8193b02981b81 --- M src/host/osmocon/Makefile.am A src/host/osmocon/loader_protocol.h M src/host/osmocon/osmoload.c A src/host/osmocon/sercomm.c A src/host/osmocon/sercomm.h 5 files changed, 10 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/57/43857/1
diff --git a/src/host/osmocon/Makefile.am b/src/host/osmocon/Makefile.am index 9b02ca1..bcafb20 100644 --- a/src/host/osmocon/Makefile.am +++ b/src/host/osmocon/Makefile.am @@ -8,15 +8,17 @@ dist-hook: echo $(VERSION) > $(distdir)/.tarball-version
-INCLUDES = $(all_includes) -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(srcdir) -DHOST_BUILD AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
+# headers are actually symlinks to the firmware +noinst_HEADERS = sercomm.h loader_protocol.h + sbin_PROGRAMS = osmocon osmoload
# FIXME: sercomm needs to move into libosmocore or another shared lib -INCLUDES += -I$(srcdir)/../../target/firmware/include/comm -I$(srcdir)/../../target/firmware/apps -DHOST_BUILD -osmocon_SOURCES = osmocon.c tpu_debug.c $(srcdir)/../../target/firmware/comm/sercomm.c +osmocon_SOURCES = osmocon.c tpu_debug.c sercomm.c osmocon_LDADD = $(LIBOSMOCORE_LIBS)
-osmoload_SOURCE = osmoload.c $(srcdir)/../../target/firmware/comm/sercomm.c +osmoload_SOURCE = osmoload.c sercomm.c osmoload_LDADD = $(LIBOSMOCORE_LIBS) diff --git a/src/host/osmocon/loader_protocol.h b/src/host/osmocon/loader_protocol.h new file mode 120000 index 0000000..a3e3bfc --- /dev/null +++ b/src/host/osmocon/loader_protocol.h @@ -0,0 +1 @@ +../../target/firmware/apps/loader/protocol.h \ No newline at end of file diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c index 097cc84..14961f5 100644 --- a/src/host/osmocon/osmoload.c +++ b/src/host/osmocon/osmoload.c @@ -38,7 +38,7 @@ #include <osmocom/core/crc16.h> #include <osmocom/core/socket.h>
-#include <loader/protocol.h> +#include <loader_protocol.h>
#define MSGB_MAX 256
diff --git a/src/host/osmocon/sercomm.c b/src/host/osmocon/sercomm.c new file mode 120000 index 0000000..2e07b7d --- /dev/null +++ b/src/host/osmocon/sercomm.c @@ -0,0 +1 @@ +../../target/firmware/comm/sercomm.c \ No newline at end of file diff --git a/src/host/osmocon/sercomm.h b/src/host/osmocon/sercomm.h new file mode 120000 index 0000000..9570947 --- /dev/null +++ b/src/host/osmocon/sercomm.h @@ -0,0 +1 @@ +../../target/firmware/include/comm/sercomm.h \ No newline at end of file