From 8c0a280a3e0db2e50998a6bf9623dd7f4cb6fb8c Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 5 Apr 2014 02:50:07 -0400 Subject: [PATCH] Fixed Windows builds. Now we also build Win64 packages. --- Makefile | 4 ++-- distro/Makefile | 6 ++++++ distro/win32/Makefile | 4 ++-- distro/win64/Makefile | 22 ++++++++++++++++++++++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 distro/win64/Makefile diff --git a/Makefile b/Makefile index 3097368..38e0784 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ include include.mk UNAME ?= $(shell uname) -CYGWIN = $(findstring CYGWIN, $(UNAME)) -MINGW = $(findstring MINGW32, $(UNAME)) +CYGWIN = $(findstring CYGWIN, $(UNAME)) +MINGW = $(findstring MINGW, $(UNAME)) CFLAGS += -Wall -Wextra -Werror -Wstrict-aliasing -Wno-attributes #turn on tons of warnings if clang is present diff --git a/distro/Makefile b/distro/Makefile index 384b1fa..d369157 100644 --- a/distro/Makefile +++ b/distro/Makefile @@ -10,16 +10,22 @@ endif .NOTPARALLEL: upload base: + @echo "Building Debian packages ..." $(MAKE) -C deb/ $(MAKE) -C deb/ CARCH=i686 + @echo "Building Archlinux packages ..." $(MAKE) -C archlinux/this/ $(MAKE) -C archlinux/this/ CARCH=i686 + @echo "Building Slackware packages ..." $(MAKE) -C win32/ + $(MAKE) -C win64 + @echo "Building Windows packages ..." $(MAKE) -C slackware/this/ $(MAKE) -C slackware/this/ CARCH=i686 @mv deb/*.deb ./ @mv archlinux/this/*pkg.tar.xz ./ @mv win32/*.zip ./ + @mv win64/*.zip ./ @mv slackware/this/*.txz ./ upload: diff --git a/distro/win32/Makefile b/distro/win32/Makefile index 62bb220..20f580c 100644 --- a/distro/win32/Makefile +++ b/distro/win32/Makefile @@ -6,8 +6,8 @@ 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=/ strip install + $(MAKE) CC=i686-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) clean + $(MAKE) CC=i686-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) DESTDIR=distro/win32/$(BINDIR) PREFIX=/ strip install @mkdir -p $(BINDIR)/doc @groff -mandoc $(BINDIR)/man1/gmqpak.1 | ps2pdf - $(BINDIR)/doc/gmqpak.pdf @groff -mandoc $(BINDIR)/man1/qcvm.1 | ps2pdf - $(BINDIR)/doc/qcvm.pdf diff --git a/distro/win64/Makefile b/distro/win64/Makefile new file mode 100644 index 0000000..f45f351 --- /dev/null +++ b/distro/win64/Makefile @@ -0,0 +1,22 @@ +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=x86_64-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) clean + $(MAKE) CC=x86_64-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) DESTDIR=distro/win64/$(BINDIR) PREFIX=/ strip install + @mkdir -p $(BINDIR)/doc + @groff -mandoc $(BINDIR)/man1/gmqpak.1 | ps2pdf - $(BINDIR)/doc/gmqpak.pdf + @groff -mandoc $(BINDIR)/man1/qcvm.1 | ps2pdf - $(BINDIR)/doc/qcvm.pdf + @groff -mandoc $(BINDIR)/man1/gmqcc.1 | ps2pdf - $(BINDIR)/doc/gmqcc.pdf + @rm -rf $(BINDIR)/man1/ + @zip -r $(BINDIR)-win64.zip $(BINDIR) + @rm -rf $(BINDIR) +clean: + $(MAKE) -C $(BASEDIR) clean + @rm -f *.zip + +all: base -- 2.39.2