From e0ee973abb0e8f4be49f41945ae2cca7f82fb962 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 24 Apr 2021 17:14:18 -0700 Subject: [PATCH] add loramac, and make the subtree stuff generic.. --- Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 75d5399..12d77d3 100644 --- a/Makefile +++ b/Makefile @@ -88,14 +88,20 @@ runtests: .c.o: $(ARMCC) $(ARMTARGET) $(CFLAGS) -c $< -o $@ +STROBE_NAME = strobe STROBE_REPO = https://git.code.sf.net/p/strobe/code STROBE_BRANCH = master -STROBE_PATH = strobe -.PHONY: init-strobe -init-strobe: - git subtree add -P $(STROBE_PATH) --squash $(STROBE_REPO) $(STROBE_BRANCH) +LORAMAC_NAME = loramac +LORAMAC_REPO = https://github.com/Lora-net/LoRaMac-node.git +LORAMAC_BRANCH = master -.PHONY: update-strobe -update-strobe: - git subtree pull -P $(STROBE_PATH) --squash $(STROBE_REPO) $(STROBE_BRANCH) +.for module in STROBE LORAMAC +.PHONY: init-$($(module)_NAME) +init-$($(module)_NAME): + git subtree add -P $($(module)_NAME) --squash $($(module)_REPO) $($(module)_BRANCH) + +.PHONY: update-$($(module)_NAME) +update-$($(module)_NAME): + git subtree pull -P $($(module)_NAME) --squash $($(module)_REPO) $($(module)_BRANCH) +.endfor