aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/Makefile.am
blob: 4b52834602abeeca47443823206e0863ef981374 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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

if DEVICE_XTRX
OSMOCONF_FILES += osmo-trx-xtrx/osmo-trx-xtrx.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