From: Dale Weiler Date: Sun, 21 Apr 2013 11:45:41 +0000 (+0000) Subject: Some stuff for building win32 packages via mingw32 X-Git-Tag: before-library~24^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0f7634876f8358d7d7da2ca50a28a6402753a3a3;p=xonotic%2Fgmqcc.git Some stuff for building win32 packages via mingw32 --- diff --git a/distro/Makefile b/distro/Makefile index d29cff8..36fc942 100644 --- a/distro/Makefile +++ b/distro/Makefile @@ -12,8 +12,10 @@ base: $(MAKE) -C deb/ CARCH=i686 $(MAKE) -C archlinux/this/ $(MAKE) -C archlinux/this/ CARCH=i686 + $(MAKE) -C win32/ @mv deb/*.deb ./ @mv archlinux/this/*pkg.tar.xz ./ + @mv win32/*.zip ./ upload: @echo "APPKEY:76vh3q42hnvmzm3" > dropbox_config @@ -24,11 +26,12 @@ upload: @wget -q "http://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" @chmod +x dropbox_uploader.sh @sed -i -e "s/~\/.dropbox_uploader/.\/dropbox_config/g" $$(basename $(DROPBOX)) - @find . -type f -regex ".*/.*\.\(xz\|deb\)" -exec ./$$(basename $(DROPBOX)) upload {} \; + @find . -type f -regex ".*/.*\.\(xz\|deb\|zip\)" -exec ./$$(basename $(DROPBOX)) upload {} \; @rm dropbox_config dropbox_uploader.sh clean: @rm -f *.deb @rm -f *.pkg.tar.xz + @rm -f *.zip all: base upload diff --git a/distro/win32/Makefile b/distro/win32/Makefile new file mode 100644 index 0000000..3a4ed24 --- /dev/null +++ b/distro/win32/Makefile @@ -0,0 +1,17 @@ +BASEDIR := ../.. +HEADER := $(BASEDIR)/gmqcc.h +MAJOR := `sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)` +MINOR := `sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)` +PATCH := `sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)` +BINDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH) + +base: + $(MAKE) CC=i486-mingw32-gcc UNAME=MINGW32 -C $(BASEDIR) clean + $(MAKE) CC=i486-mingw32-gcc UNAME=MINGW32 -C $(BASEDIR) DESTDIR=distro/win32/$(BINDIR) PREFIX=/ install + @zip -r $(BINDIR)-win32.zip $(BINDIR) + @rm -rf $(BINDIR) +clean: + $(MAKE) -C $(BASEDIR) clean + @rm -f *.zip + +all: base