2012-12-25 20:36:04 +00:00
#!/bin/sh -x
#this is for using the fast libco, hand-coded by byuu. the dll isnt used, and so the threads implementation wont be useful, so it cant be debugged easily
cd bsnes
mkdir obj
mkdir out
2012-12-26 20:25:06 +00:00
if [ " $1 " = = "64" ] ; then
export cflags64 = -m64 ;
export compiler = i686-w64-mingw32-c++.exe
fi
if [ " $1 " = = "32" ] ; then
export cflags32 = -llibco_msvc_win32 ;
fi
2012-12-25 20:36:04 +00:00
#debug:
#export BIZWINCFLAGS="-I. -O0 -g -masm=intel -DLIBCO_IMPORT -DLIBCO_MSVC -static-libgcc -static-libstdc++"
#not debug
2012-12-26 20:25:06 +00:00
export BIZWINCFLAGS = " -I. -O3 -masm=intel -static-libgcc -static-libstdc++ ${ cflags64 } "
2012-12-25 20:36:04 +00:00
2012-12-26 21:25:39 +00:00
export TARGET_LIBSNES_LIBDEPS = " -L ../libco_msvc_win32/release/ -static -static-libgcc -static-libstdc++ ${ cflags64 } ${ cflags32 } -mwindows "
2012-12-26 20:25:06 +00:00
export profile = $2
export bits = $1
2012-12-25 20:36:04 +00:00
platform = win target = libsnes make -e -j 4
cd ..
2012-12-26 20:25:06 +00:00
filename = libsneshawk-${ bits } -${ profile } .exe
2012-12-25 20:36:04 +00:00
targetdir = ../BizHawk.MultiClient/output/dll
targetpath = ${ targetdir } /${ filename }
cp bsnes/out/${ filename } ${ targetdir }
2012-12-26 20:25:06 +00:00
if [ " $3 " = = "compress" ] ; then
2012-12-25 20:36:04 +00:00
upx -9 ${ targetpath } ;
fi