WIP MSVC support

This commit is contained in:
Nishi 2026-06-20 02:32:08 +09:00
commit 46f95f8314
3 changed files with 45 additions and 31 deletions

6
README
View file

@ -26,9 +26,13 @@
doc/doc Operation guide for SJ3 and other documents(Japanese) doc/doc Operation guide for SJ3 and other documents(Japanese)
* Tested machine * Tested machine
PC Linux 6.6.87.2-microsoft-standard-WSL2 PC Debian GNU/Linux 13
Windows 11 Windows 11
* Tested compilers
GCC/Clang Debian GNU/Linux 13
Open Watcom 2.0 Windows 11
* Differences * Differences
- Multiple contexts can be created in SJ4. SJ3's behavior of using - Multiple contexts can be created in SJ4. SJ3's behavior of using
global variables can be brought back with -DSJ3_GLOBAL. global variables can be brought back with -DSJ3_GLOBAL.

View file

@ -1,30 +0,0 @@
#!/bin/sh
for i in lib/sj3core/*.c; do
if [ -f $i.obj ]; then
continue
fi
echo $i
owcc -Iinclude/sj3common -Iinclude/sj3core -bnt -c -o $i.obj $i || exit 1
done
find lib/sj3core -name "*.obj" | while read a; do
echo "+$a"
done | xargs wlib -q -b -fo -n sj3core.lib
executable() {
N=$1
for i in src/$N/*.c; do
if [ -f $i.obj ]; then
continue
fi
echo $i
owcc -DUTF8 -DENGLISH -Iinclude/sj3common -Iinclude/sj3core -bnt -c -o $i.obj $i || exit 1
done
owcc -bnt -o $N.exe src/$N/*.obj $2
}
executable sj3mkdic
executable sj3test sj3core.lib

40
win32.sh Executable file
View file

@ -0,0 +1,40 @@
#!/bin/sh
if [ "x$1" = "x" ]; then
echo "Usage: $0 [watcom|msvc]"
exit 1
fi
for i in lib/sj4core/*.c; do
if [ -f $i.obj ]; then
continue
fi
echo $i
if [ "$1" = "watcom" ]; then
cl /Iinclude/sj4common /Iinclude/sj4core /c /fo$i.obj $i || exit 1
else
owcc -Iinclude/sj4common -Iinclude/sj4core -bnt -c -o $i.obj $i || exit 1
fi
done
find lib/sj4core -name "*.obj" | while read a; do
echo "+$a"
done | xargs wlib -q -b -fo -n sj4core.lib
executable() {
N=$1
for i in src/$N/*.c; do
if [ -f $i.obj ]; then
continue
fi
echo $i
owcc -DUTF8 -DENGLISH -Iinclude/sj4common -Iinclude/sj4core -bnt -c -o $i.obj $i || exit 1
done
owcc -bnt -o $N.exe src/$N/*.obj $2
}
executable sj4mkdic
executable sj4test sj4core.lib