From d7d2c7f14734504d68d67ee5d46ecd3472c0922e Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Wed, 13 Feb 2013 18:49:17 -0600 Subject: [PATCH] Added win32 cross-compilation script. --- cross-compile | 12 ++++++++++++ makefile | 11 ++++++----- version.h | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100755 cross-compile diff --git a/cross-compile b/cross-compile new file mode 100755 index 0000000..91fc44b --- /dev/null +++ b/cross-compile @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Short script to do cross compilation with MXE on Linux +# +# by James Hammons +# (C) 2012 Underground Software +# +echo "Cross compiling for Win32..." +export PATH=/opt/mxe/usr/bin:$PATH +make CROSS=i686-pc-mingw32- +rel=`git log -1 --pretty=format:%ci | cut -d ' ' -f 1 | tr -d -` +mv rmac rmac.exe && upx -9v rmac.exe && zip -9v rmac-$rel.zip rmac.exe diff --git a/makefile b/makefile index 74ac5dc..e817900 100644 --- a/makefile +++ b/makefile @@ -6,7 +6,8 @@ # rm = /bin/rm -f -CC = cc +CC = $(CROSS)gcc +HOSTCC = gcc CFLAGS = -g -D__GCCUNIX__ -I. @@ -41,16 +42,16 @@ risckw.h : kwtab kwgen # kwgen.o : kwgen.c - $(CC) $(CFLAGS) -c kwgen.c + $(HOSTCC) $(CFLAGS) -c kwgen.c kwgen : kwgen.o - $(CC) $(CFLAGS) -o kwgen kwgen.o + $(HOSTCC) $(CFLAGS) -o kwgen kwgen.o 68kgen.o : 68kgen.c - $(CC) $(CFLAGS) -c 68kgen.c + $(HOSTCC) $(CFLAGS) -c 68kgen.c 68kgen : 68kgen.o - $(CC) $(CFLAGS) -o 68kgen 68kgen.o + $(HOSTCC) $(CFLAGS) -o 68kgen 68kgen.o # # Build RMAC Executable diff --git a/version.h b/version.h index 7d73c35..0187394 100644 --- a/version.h +++ b/version.h @@ -13,6 +13,6 @@ #define MAJOR 1 // Major version number #define MINOR 2 // Minor version number -#define PATCH 1 // Patch release number +#define PATCH 2 // Patch release number #endif // __VERSION_H__ -- 2.37.2