summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2013-03-27 14:35:11 +0000
committerTim Angus <tim@ngus.net>2013-03-27 14:38:27 +0000
commit177f621faa3ab1556a954a9f0017b364476a0d7f (patch)
tree4b28a41f01c883ebb969856ce098dd5cd1244203 /Makefile
parent04f73b6adfc79c5afc5428335293392fa936cb79 (diff)
Add option to create archive of build product
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 718e061d..e631f37b 100644
--- a/Makefile
+++ b/Makefile
@@ -1158,10 +1158,16 @@ endif
@echo ""
ifneq ($(TARGETS),)
ifndef DEBUG_MAKEFILE
- @$(MAKE) $(TARGETS) V=$(V)
+ @$(MAKE) $(TARGETS) $(B).zip V=$(V)
endif
endif
+$(B).zip: $(TARGETS)
+ifdef ARCHIVE
+ rm -f $@
+ (cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS))
+endif
+
makedirs:
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
@if [ ! -d $(B) ];then $(MKDIR) $(B);fi