diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-12 14:33:27 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-12 14:33:27 +0100 |
| commit | b88be39cb16392a13197431726dabdeb527609b7 (patch) | |
| tree | 2e6a154476af578005ce67d6b1c77224215575c5 /build.bat | |
| parent | 472bbefd98264fb8e82fd0876edec416052a57ca (diff) | |
| download | nissy-core-windows.tar.gz nissy-core-windows.zip | |
Added windows support via clangwindows
Diffstat (limited to '')
| -rw-r--r-- | build.bat | 27 |
1 files changed, 15 insertions, 12 deletions
| @@ -1,18 +1,21 @@ | |||
| 1 | SET CFLAGS=-std=c11 -fPIC -D_POSIX_C_SOURCE=199309L -pthread -O3 -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -DTHREADS=16 -DPORTABLE | 1 | SET COMPILER=clang |
| 2 | 2 | ||
| 3 | :: Build the core library and the shell. | 3 | SET ARCH= |
| 4 | :: Requires WinLibs - https://winlibs.com/ | 4 | SET WARNINGS=-Wno-deprecated-declarations |
| 5 | SET VARIABLES=-DTHREADS=1 -DPORTABLE | ||
| 6 | SET OFLAGS=-O3 | ||
| 7 | SET DFLAGS=-g -fsanitize=address | ||
| 8 | SET CFLAGS=-std=c11 %OFLAGS% %ARCH% %WARNINGS% %VARIABLES% | ||
| 5 | 9 | ||
| 6 | gcc %CFLAGS% -c src/nissy.c | 10 | SET STACKSIZE=-Wl,-stack:16777216 |
| 7 | gcc %CFLAGS% nissy.o shell/shell.c -o run | 11 | SET 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 | 17 | SET PYPATH=%userprofile%\AppData\Local\Programs\Python\Python313 |
| 15 | ::SET PYINCLUDE=%PYPATH%\include | 18 | SET PYINCLUDE=%PYPATH%\include |
| 16 | ::SET PYDLL=%PYPATH%\python313.dll | 19 | SET 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 |
