File fix.patch of Package osmocom-bb-steve-m-trx-rebased

diff --git a/src/Makefile b/src/Makefile
index d92acbc1..af0a68a4 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,8 +12,7 @@ CROSS_TOOL_PREFIX=$(CROSS_HOST)-
 TOPDIR=$(shell pwd)
 
 all: libosmocore-target nofirmware firmware mtk-firmware
-
-nofirmware: layer23 osmocon trxcon gsmmap gprsdecode virtphy
+nofirmware: layer23 osmocon gsmmap
 
 libosmocore-target: shared/libosmocore/build-target/src/.libs/libosmocore.a
 
@@ -34,79 +33,24 @@ shared/libosmocore/build-target/src/.libs/libosmocore.a: shared/libosmocore/buil
 	cd shared/libosmocore/build-target && make
 
 
-.PHONY: osmocon
-osmocon: host/osmocon/osmocon
-
-host/osmocon/configure: host/osmocon/configure.ac
-	cd host/osmocon && autoreconf -i
-
-host/osmocon/Makefile: host/osmocon/configure
-	cd host/osmocon && ./configure $(HOST_CONFARGS)
-
-host/osmocon/osmocon: host/osmocon/Makefile
-	make -C host/osmocon
-
-.PHONY: virtphy
-virtphy: host/virt_phy/virtphy
-
-host/virt_phy/configure: host/virt_phy/configure.ac
-	cd host/virt_phy && autoreconf -i
-
-host/virt_phy/Makefile: host/virt_phy/configure
-	cd host/virt_phy && ./configure $(HOST_CONFARGS)
-
-host/virt_phy/virtphy: host/virt_phy/Makefile
-	make -C host/virt_phy
-
-.PHONY: trxcon
-trxcon: host/trxcon/trxcon
-
-host/trxcon/configure: host/trxcon/configure.ac
-	cd host/trxcon && autoreconf -i
-
-host/trxcon/Makefile: host/trxcon/configure
-	cd host/trxcon && ./configure $(HOST_CONFARGS)
-
-host/trxcon/trxcon: host/trxcon/Makefile
-	make -C host/trxcon
-
-
-.PHONY: gsmmap
-gsmmap: host/gsmmap/gsmmap
-
-host/gsmmap/configure: host/gsmmap/configure.ac
-	cd host/gsmmap && autoreconf -i
-
-host/gsmmap/Makefile: host/gsmmap/configure
-	cd host/gsmmap && ./configure $(HOST_CONFARGS)
-
-host/gsmmap/gsmmap: host/gsmmap/Makefile
-	make -C host/gsmmap
-
-
-.PHONY: layer23
-layer23: host/layer23/layer23
-
-host/layer23/configure: host/layer23/configure.ac
-	cd host/layer23 && autoreconf -i
+HOST_APPS=osmocon gsmmap layer23
 
-host/layer23/Makefile: host/layer23/configure
-	cd host/layer23 && ./configure $(HOST_CONFARGS)
+define HOST_APP_template
+.PHONY: $(1)
 
-host/layer23/layer23: host/layer23/Makefile
-	make -C host/layer23
+host/$(1)/configure: host/$(1)/configure.ac
+	cd host/$(1) && autoreconf -i
 
-.PHONY: gprsdecode
-gprsdecode: host/gprsdecode/gprsdecode
+host/$(1)/Makefile: host/$(1)/configure
+	cd host/$(1) && ./configure $(HOST_CONFARGS) $$(HOST_$(1)_CONFARGS)
 
-host/gprsdecode/configure: host/gprsdecode/configure.ac
-	cd host/gprsdecode && autoreconf -i
+$(1): host/$(1)/Makefile
+	make -C host/$(1)
+endef
 
-host/gprsdecode/Makefile: host/gprsdecode/configure
-	cd host/gprsdecode && ./configure $(HOST_CONFARGS)
+$(foreach app,$(HOST_APPS), \
+	$(eval $(call HOST_APP_template,$(app))))
 
-host/gprsdecode/gprsdecode: host/gprsdecode/Makefile
-	make -C host/gprsdecode
 
 .PHONY: firmware
 firmware: libosmocore-target
@@ -121,10 +65,6 @@ clean:
 	make -C shared/libosmocore/build-target $@
 	make -C host/layer23 $@
 	make -C host/osmocon $@
-	make -C host/gsmmap $@
-	make -C host/gprsdecode $@
-	make -C host/virt_phy $@
-	make -C host/trxcon $@
 	make -C target/firmware $@
 	make -C target/firmware -f Makefile.mtk $@
 
@@ -132,9 +72,5 @@ distclean:
 	rm -rf shared/libosmocore/build-target
 	make -C host/layer23 $@
 	make -C host/osmocon $@
-	make -C host/gsmmap $@
-	make -C host/gprsdecode $@
-	make -C host/virt_phy $@
-	make -C host/trxcon $@
 # 'firmware' also handles 'mtk-firmware'
 	make -C target/firmware $@
openSUSE Build Service is sponsored by