Skip to content

Commit

Permalink
Switch to UPX instead of strip (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
AranVink authored Jul 7, 2024
1 parent 6dbf714 commit 5110e9f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
INSTALL = install
STRIP = strip
ZIP = zip

prefix = /usr/local/djgpp
Expand Down Expand Up @@ -47,7 +46,16 @@ dist:
rm -r $(NAME)

binarydist: adplay.exe
$(STRIP) adplay.exe
echo "Compressing adplay.exe"
@if which upx > /dev/null; then \
upx --best adplay.exe; \
elif which strip > /dev/null; then \
echo "WARNING: Using strip, since upx is not found. Please consider installing upx since it gives the best compression of the binary. Also see UPX manpage https://github.com/upx/upx/blob/250c656b9eb24b0fb54fe8c015d38b0eba5ee80c/doc/upx-doc.txt#L272C6-L272C6 for additional information on upx vs strip."; \
strip adplay.exe; \
echo "strip completed"; \
else \
echo "ERROR: strip not found, please install either upx or strip" && exit 1; \
fi
rm -rf $(BINARYNAME).zip $(BINARYNAME)
mkdir $(BINARYNAME)
cp $(BINARYDIST) $(BINARYNAME)
Expand Down

0 comments on commit 5110e9f

Please sign in to comment.