forked from EasyRPG/RTP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a helper Makefile for common tasks
It is ignored for git exports, because it uses git internally and is mostly useful for developers, who will work with a git checkout anyway.
- Loading branch information
1 parent
b1e067e
commit 64e3e38
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
# ignore Makefile for distribution archives | ||
/Makefile export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# distribution archives | ||
easyrpg-rtp.zip | ||
easyrpg-rtp.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
# helper variable | ||
MYDIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
|
||
help: | ||
@echo "This Makefile is intended to be used by developers only." | ||
@echo "Therefore it does nothing by default. Available targets:" | ||
@echo " optimize :" | ||
@echo " -png : Recompresses png files with zopfli for smaller file size" | ||
@echo " dist : " | ||
@echo " -zip : Creates a distribution zip archive (for use under Windows)" | ||
@echo " -tar : Creates a distribution tarball (for other platforms)" | ||
@echo "The meta targets will execute all their subtargets." | ||
|
||
dist: dist-tar dist-zip | ||
|
||
dist-zip: | ||
@rm -f easyrpg-rtp.zip | ||
@git archive --prefix=EasyRPG-RTP/ -9 --output=$(MYDIR)/easyrpg-rtp.zip master | ||
|
||
dist-tar: | ||
@rm -f easyrpg-rtp.tar.gz | ||
@git archive --prefix=EasyRPG-RTP/ --output=$(MYDIR)/easyrpg-rtp.tar.gz master | ||
|
||
optimize: optimize-png | ||
|
||
optimize-png: | ||
find $(MYDIR) -iname "*.png" -execdir advpng -z4 {} \+ |