Add option to create archive of build product

This commit is contained in:
Tim Angus 2013-03-27 14:35:11 +00:00
parent 838fcf45cb
commit 2b3c5492c7
1 changed files with 7 additions and 1 deletions

View File

@ -1209,10 +1209,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