Files
text_editor/build.bat
Krzosa Karol 38b9b7df10 luaunity.c
2025-11-26 10:21:18 +01:00

32 lines
1.2 KiB
Batchfile

@echo off
mkdir build
cd build
if "%1"=="release" (
set profile_flags=-DDEBUG_BUILD=0 -O2
) else (
set profile_flags=-DDEBUG_BUILD=1
)
if not exist "luaunity.obj" (
cl -Zi -nologo -I../src/external/lua/src -I../src/external/glad ../src/external/luaunity.c ../src/external/glad/glad.c -c
)
if not exist "metaprogram.exe" (
cl /WX /W3 /wd4200 /diagnostics:column -FC -Zi -nologo -Fe:metaprogram.exe -I../src ../src/metaprogram/metaprogram.cpp ../src/basic/win32.cpp
)
metaprogram.exe
set sdl=../src/external/SDL/win32-static/SDL3-static.lib ../src/external/SDL/win32-static/SDL_uclibc.lib
cl /EHsc- /MD /Zi /FC /nologo /WX /W3 /wd4200 /diagnostics:column %profile_flags% ../src/text_editor/text_editor.cpp ../src/basic/win32.cpp -Fe:te.exe -I../src/external/SDL/include -I../src/external/lua/src -I../src/external/glad -I../src/ luaunity.obj glad.obj kernel32.lib gdi32.lib user32.lib Imm32.lib ole32.lib Shell32.lib OleAut32.lib Cfgmgr32.lib Setupapi.lib Advapi32.lib version.lib winmm.lib %sdl% -link /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBCMT /NODEFAULTLIB:MSVCRTD
if "%1"=="release" (
copy te.exe ..\data\te.exe
echo written ..\data\te.exe
) else (
copy te.exe ..\data\te_debug.exe
echo written ..\data\te_debug.exe
)