diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2013-01-16 22:47:36 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2014-06-15 19:30:52 +0200 |
commit | 8fe72b6ebd9718da9acb79ea2e0cc0341fead289 (patch) | |
tree | 5eff9d80ced87765eb4198d397803d19f965a2fa | |
parent | 9e4d9871b79ad471c967158571f68de081fa7ae2 (diff) |
build: Use a template system for the various host apps
This also now allows to pass specific configure arguments to each
host application
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | src/Makefile | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/src/Makefile b/src/Makefile index a145880d..af0a68a4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -33,43 +33,23 @@ shared/libosmocore/build-target/src/.libs/libosmocore.a: shared/libosmocore/buil cd shared/libosmocore/build-target && make -.PHONY: osmocon -osmocon: host/osmocon/osmocon +HOST_APPS=osmocon gsmmap layer23 -host/osmocon/configure: host/osmocon/configure.ac - cd host/osmocon && autoreconf -i +define HOST_APP_template +.PHONY: $(1) -host/osmocon/Makefile: host/osmocon/configure - cd host/osmocon && ./configure $(HOST_CONFARGS) +host/$(1)/configure: host/$(1)/configure.ac + cd host/$(1) && autoreconf -i -host/osmocon/osmocon: host/osmocon/Makefile - make -C host/osmocon +host/$(1)/Makefile: host/$(1)/configure + cd host/$(1) && ./configure $(HOST_CONFARGS) $$(HOST_$(1)_CONFARGS) +$(1): host/$(1)/Makefile + make -C host/$(1) +endef -.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/layer23/Makefile: host/layer23/configure - cd host/layer23 && ./configure $(HOST_CONFARGS) - -host/layer23/layer23: host/layer23/Makefile - make -C host/layer23 +$(foreach app,$(HOST_APPS), \ + $(eval $(call HOST_APP_template,$(app)))) .PHONY: firmware |