Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bizwinmakeone.sh
2 views
1
#!/bin/sh -x
2
3
#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
4
cd bsnes
5
mkdir obj
6
mkdir out
7
8
if [ "$1" == "64" ]; then
9
export cflags64=-m64 ;
10
export compiler=i686-w64-mingw32-c++.exe
11
fi
12
13
if [ "$1" == "32" ]; then
14
export cflags32=-llibco_msvc_win32 ;
15
fi
16
17
#debug:
18
#export BIZWINCFLAGS="-I. -O0 -g -masm=intel -DHOOKS -DLIBCO_IMPORT -DLIBCO_MSVC -static-libgcc -static-libstdc++"
19
20
#not debug
21
export BIZWINCFLAGS="-I. -O3 -masm=intel -DHOOKS -static-libgcc -static-libstdc++ ${cflags64}"
22
23
export TARGET_LIBSNES_LIBDEPS="-L ../libco_msvc_win32/release/ -static -static-libgcc -static-libstdc++ ${cflags64} ${cflags32} -mwindows"
24
export profile=$2
25
export bits=$1
26
27
platform=win target=libsnes make -e -j 4
28
cd ..
29
30
filename=libsneshawk-${bits}-${profile}.exe
31
targetdir=../output/dll
32
targetpath=${targetdir}/${filename}
33
cp bsnes/out/${filename} ${targetdir}
34
if [ "$3" == "compress" ]; then
35
upx -9 ${targetpath} ;
36
fi
37