]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Some stuff for building win32 packages via mingw32
authorDale Weiler <killfieldengine@gmail.com>
Sun, 21 Apr 2013 11:45:41 +0000 (11:45 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 21 Apr 2013 11:45:41 +0000 (11:45 +0000)
distro/Makefile
distro/win32/Makefile [new file with mode: 0644]

index d29cff8b2876e1f28d5023ed90ec223826b1c4d7..36fc942daca3fbd3553924e2d70d6c9761ab79d3 100644 (file)
@@ -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 (file)
index 0000000..3a4ed24
--- /dev/null
@@ -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