Added a few targets to the makefile: dist, distclean, prof
The prof target takes an optional tag variable to customize the generated file name
This commit is contained in:
parent
9cf49fe991
commit
8ff0603d6a
1 changed files with 20 additions and 0 deletions
20
Makefile
20
Makefile
|
@ -1,6 +1,15 @@
|
|||
DATE := `date +'%Y%m%d'`
|
||||
TAG := moodle-$(USER)
|
||||
|
||||
ifneq ($(tag),)
|
||||
TAG := $(TAG)-$(tag)
|
||||
endif
|
||||
|
||||
CC := gcc
|
||||
LD := gcc
|
||||
|
||||
TAR_FILENAME := $(DATE)-mictcp-$(TAG).tar.gz
|
||||
|
||||
MODULES := api apps
|
||||
SRC_DIR := $(addprefix src/,$(MODULES)) src
|
||||
BUILD_DIR := $(addprefix build/,$(MODULES)) build
|
||||
|
@ -40,4 +49,15 @@ $(BUILD_DIR):
|
|||
clean:
|
||||
@rm -rf $(BUILD_DIR)
|
||||
|
||||
distclean:
|
||||
@rm -rf $(BUILD_DIR)
|
||||
@-rm -f *.tar.gz || true
|
||||
|
||||
|
||||
$(foreach bdir,$(BUILD_DIR),$(eval $(call make-goal,$(bdir))))
|
||||
|
||||
dist:
|
||||
@tar --exclude=build --exclude=*tar.gz --exclude=.git* -czvf mictcp-bundle.tar.gz ../mictcp
|
||||
|
||||
prof:
|
||||
@tar --exclude=build --exclude=.*tar.gz --exclude=video -czvf $(TAR_FILENAME) ../mictcp
|
||||
|
|
Loading…
Reference in a new issue