aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/Makefile.am')
-rw-r--r--doc/examples/Makefile.am41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
new file mode 100644
index 0000000..88d9142
--- /dev/null
+++ b/doc/examples/Makefile.am
@@ -0,0 +1,41 @@
+OSMOCONF_FILES =
+osmoconfdir = $(sysconfdir)/osmocom
+
+if DEVICE_UHD
+OSMOCONF_FILES += osmo-trx-uhd/osmo-trx-uhd.cfg
+endif
+
+# if DEVICE_USRP1
+# TODO: no usrp1 sample file yet
+# OSMOCONF_FILES += osmo-trx-usrp1/osmo-trx-usrp1.cfg
+# endif
+
+if DEVICE_LMS
+OSMOCONF_FILES += osmo-trx-lms/osmo-trx-lms.cfg
+endif
+
+osmoconf_DATA = $(OSMOCONF_FILES)
+EXTRA_DIST = $(OSMOCONF_FILES)
+
+CFG_FILES = find $(srcdir) -type f -name '*.cfg*' | sed -e 's,^$(srcdir),,'
+
+dist-hook:
+ for f in $$($(CFG_FILES)); do \
+ j="$(distdir)/$$f" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$$f $$j; \
+ done
+
+install-data-hook:
+ for f in $$($(CFG_FILES)); do \
+ j="$(DESTDIR)$(docdir)/examples/$$f" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$$f $$j; \
+ done
+
+uninstall-hook:
+ @$(PRE_UNINSTALL)
+ for f in $$($(CFG_FILES)); do \
+ j="$(DESTDIR)$(docdir)/examples/$$f" && \
+ $(RM) $$j; \
+ done