• R/O
  • HTTP
  • SSH
  • HTTPS

mhash384: Commit

MHash-384 development repository


Commit MetaInfo

Revision39b490a65b6a92368bebab1c5c2b40a6a485bd2a (tree)
Time2020-03-01 02:07:55
AuthorLoRd_MuldeR <mulder2@gmx....>
CommiterLoRd_MuldeR

Log Message

Updated the Makefile to create a ZIP package on Windows.

Change Summary

Incremental Difference

--- a/Makefile
+++ b/Makefile
@@ -9,8 +9,9 @@ NODOC ?= 0
99 # TOOLS
1010 # -----------------------------------------------
1111
12-TAR ?= tar
13-PNDOC ?= pandoc
12+TAR ?= tar
13+ZIP ?= zip
14+PNDC ?= pandoc
1415
1516 # -----------------------------------------------
1617 # SYSTEM DETECTION
@@ -39,19 +40,24 @@ else
3940 APPNAME = mhash384g
4041 endif
4142
43+PKGPATH = $(OUTDIR)/$(APPNAME).$(ISODATE).$(OS_TYPE)
44+TARFILE = $(PKGPATH).tgz
45+ZIPFILE = $(PKGPATH).zip
46+
4247 ifeq ($(words $(filter %mingw32 %windows-gnu %cygwin %cygnus,$(OS_TYPE))),0)
4348 SUFFIX = run
49+ TARGET = $(TARFILE)
4450 else
4551 SUFFIX = exe
52+ TARGET = $(ZIPFILE)
4653 endif
4754
4855 EXEFILE = $(APPNAME).$(SUFFIX)
49-TARFILE = $(OUTDIR)/$(APPNAME).$(ISODATE).$(OS_TYPE).tgz
5056
5157 ifneq ($(NODOCS),1)
52-DOCFILE = README.html
58+ DOCFILE = README.html
5359 else
54-DOCFILE = README.md
60+ DOCFILE = README.md
5561 endif
5662
5763 # -----------------------------------------------
@@ -60,7 +66,7 @@ endif
6066
6167 .PHONY: all clean $(SUBDIRS) $(CLEANUP)
6268
63-all: $(TARFILE)
69+all: $(TARGET)
6470
6571 $(TARFILE): $(SUBDIRS) $(DOCFILE)
6672 @printf "\033[1;36m===[Make package]===\033[0m\n"
@@ -69,6 +75,13 @@ $(TARFILE): $(SUBDIRS) $(DOCFILE)
6975 $(TAR) -czvf $@ COPYING.txt $(DOCFILE) img/mhash384/*.jpg -C $(BINDIR) $(EXEFILE) BUILD_TAG.txt
7076 @printf "\033[1;32mCompleted.\033[0m\n"
7177
78+$(ZIPFILE): $(SUBDIRS) $(DOCFILE)
79+ @printf "\033[1;36m===[Make package]===\033[0m\n"
80+ @mkdir -p $(dir $@)
81+ rm -f $@
82+ $(ZIP) -j $@ COPYING.txt $(DOCFILE) $(BINDIR)/$(EXEFILE) $(BINDIR)/BUILD_TAG.txt && $(ZIP) $@ img/mhash384/*.jpg
83+ @printf "\033[1;32mCompleted.\033[0m\n"
84+
7285 $(SUBDIRS):
7386 @printf "\033[1;36m===[Make %s]===\033[0m\n" $@
7487 $(MAKE) -C $@
@@ -76,7 +89,8 @@ $(SUBDIRS):
7689
7790 %.html: %.md
7891 @printf "\033[1;36m===[Make %s]===\033[0m\n" $(basename $@)
79- $(PNDOC) --from markdown_github+pandoc_title_block+header_attributes+implicit_figures+yaml_metadata_block --to html5 --toc -N --standalone -H etc/css/style.inc -o $@ $<
92+ $(PNDC) --from markdown_github+pandoc_title_block+header_attributes+implicit_figures+yaml_metadata_block --to html5 --toc -N --standalone -H etc/css/style.inc -o $@ $<
93+ @printf "\033[1;32mCompleted.\033[0m\n"
8094
8195 clean: $(CLEANUP)
8296 @printf "\033[1;31m===[Clean package]===\033[0m\n"
--- a/README.md
+++ b/README.md
@@ -497,13 +497,17 @@ The following options can be used to tweak the behavior of the provided makefile
497497 * **`STATIC`**: If set to `1`, link with *static* CRT libraries; otherwise link with *shared* CRT libraries (default is `0`)
498498 * **`DEBUG`**: If set to `1`, generate a binary suitable for debugging; otherwise generate an optimized binary (default is `0`)
499499 * **`NODOCS`**: If set to `1`, the HTML documents are **no** generated; useful where pandoc is unavailable (default is `0`)
500+* **`SANITIZE`**: Instrument the binary with the specified sanitizer, e.g. `address` to enable the [*AddressSanitizer*](https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Instrumentation-Options.html#index-fsanitize_003daddress) (*no* default)
501+
502+The following options can be used to override the default tools used by the makefiles:
503+
500504 * **`CXX`**: The C++ compiler to be used (default is *system-specific*, e.g. `g++` or `clang++`)
501505 * **`AR`**: The archiver to be used (default is *system-specific*, usually `ar`)
502506 * **`STRIP`**: The strip program to be used (default is `strip`)
503-* **`WNDRS`**: The Windows resource compiler to be used, used on Cygwin and MinGW only (default is `windres`)
504-* **`PNDOC`**: The pandoc document converter to be used (default is `pandoc`)
507+* **`PNDC`**: The document converter to be used (default is `pandoc`)
505508 * **`TAR`**: The tarball program to be used (default is `tar`)
506-* **`SANITIZE`**: Instrument the binary with the specified sanitizer, e.g. `address` to enable [*AddressSanitizer*](https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Instrumentation-Options.html#index-fsanitize_003daddress) (*no* default)
509+* **`WNDRS`**: The Windows resource compiler to be used, used on Cygwin and MinGW only (default is `windres`)
510+* **`ZIP`**: The zip program to be used, used on Cygwin and MinGW only (default is `zip`)
507511
508512 ### Windows support
509513
Show on old repository browser