aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-08-12 14:33:27 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-08-12 14:33:27 +0100
commitb88be39cb16392a13197431726dabdeb527609b7 (patch)
tree2e6a154476af578005ce67d6b1c77224215575c5
parent472bbefd98264fb8e82fd0876edec416052a57ca (diff)
downloadnissy-core-b88be39cb16392a13197431726dabdeb527609b7.tar.gz
nissy-core-b88be39cb16392a13197431726dabdeb527609b7.zip
Added windows support via clangwindows
Diffstat (limited to '')
-rw-r--r--build.bat27
1 files changed, 15 insertions, 12 deletions
diff --git a/build.bat b/build.bat
index 5f31931..ae1c037 100644
--- a/build.bat
+++ b/build.bat
@@ -1,18 +1,21 @@
1SET CFLAGS=-std=c11 -fPIC -D_POSIX_C_SOURCE=199309L -pthread -O3 -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -DTHREADS=16 -DPORTABLE 1SET COMPILER=clang
2 2
3:: Build the core library and the shell. 3SET ARCH=
4:: Requires WinLibs - https://winlibs.com/ 4SET WARNINGS=-Wno-deprecated-declarations
5SET VARIABLES=-DTHREADS=1 -DPORTABLE
6SET OFLAGS=-O3
7SET DFLAGS=-g -fsanitize=address
8SET CFLAGS=-std=c11 %OFLAGS% %ARCH% %WARNINGS% %VARIABLES%
5 9
6gcc %CFLAGS% -c src/nissy.c 10SET STACKSIZE=-Wl,-stack:16777216
7gcc %CFLAGS% nissy.o shell/shell.c -o run 11SET LFLAGS=%STACKSIZE%
8 12
9:: Currently, building the Python module is not supported. 13%COMPILER% %CFLAGS% -c src\nissy.c || exit /b
10:: There are probably some issues related to using GCC + MINGW instead 14%COMPILER% %CFLAGS% %LFLAGS% nissy.o shell\shell.c -o run.exe || exit /b
11:: of a more native Windows compiler.
12 15
13:: Python libraries - change to mathc your local installation 16:: Python libraries - change to mathc your local installation
14::SET PYPATH=%userprofile%\AppData\Local\Programs\Python\Python313 17SET PYPATH=%userprofile%\AppData\Local\Programs\Python\Python313
15::SET PYINCLUDE=%PYPATH%\include 18SET PYINCLUDE=%PYPATH%\include
16::SET PYDLL=%PYPATH%\python313.dll 19SET PYLIBS=%PYPATH%\libs
17 20
18::gcc %CFLAGS% -I%PYINCLUDE% -shared %PYDLL% python/nissy_module.c nissy.o -o nissy_python_module.pyd 21%COMPILER% %CFLAGS% -I%PYINCLUDE% -L%PYLIBS% -shared -lpython3 python/nissy_module.c nissy.o -o nissy.pyd \ No newline at end of file

Generated with cgit - Back to sebastiano.tronto.net