From 80b4c698c24e715b666d36176e6cba2cdd009eb2 Mon Sep 17 00:00:00 2001 From: Henry Kroll III Date: Sat, 24 Apr 2010 13:27:56 -0700 Subject: make win32 version of libtcc1.a for cross-compiler on x86 / x86_64 --- make_libtcc1_win32.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 make_libtcc1_win32.sh (limited to 'make_libtcc1_win32.sh') diff --git a/make_libtcc1_win32.sh b/make_libtcc1_win32.sh new file mode 100755 index 0000000..a13203f --- /dev/null +++ b/make_libtcc1_win32.sh @@ -0,0 +1,22 @@ +#!/bin/bash +a=$(mktemp) +b=$(mktemp) +c=$(mktemp) +cp config.h $a +cp config.mak $b +# force 386 build on x86_64 +./configure --cpu=x86 +# configure doesn't provide a way to set tccdir +tccdir=$(grep TCCDIR $a|awk '{gsub("\"","",$3);print $3}') +grep -v CONFIG_TCCDIR $a > $c +echo "#define CONFIG_TCCDIR \"${tccdir}/win32\"" >> $c +mv $c config.h +make i386-win32-tcc +mv i386-win32-tcc tcc.exe +sync +make CONFIG_WIN32=1 libtcc1.a +cp include/* win32/include +mv libtcc1.a win32/lib +mv $a config.h +mv $b config.mak +rm tcc.exe -- cgit v1.3.1