From f8c92cfa9eeb82a608d409cac70d9d2533ab79d8 Mon Sep 17 00:00:00 2001 From: Quentin LADEVIE Date: Tue, 29 Apr 2025 23:28:52 +0200 Subject: Compile files one by one --- build.bat | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'build.bat') diff --git a/build.bat b/build.bat index 57d60ee..45538f1 100644 --- a/build.bat +++ b/build.bat @@ -33,13 +33,17 @@ if "%release%"=="0" ( set L_FLAGS=/DEBUG %L_FLAGS% ) +set src=main utils events module parser pdb :: DBG :: Compile -cl /Fd:%BUILD_DIR%\main.pdb %C_FLAGS% src\main.c +(for %%s in (%src%) do ( + call set OBJS=%%OBJS%% %BUILD_DIR%\%%s.obj + cl /Fd:%BUILD_DIR%\%%s.pdb %C_FLAGS% src\%%s.c +)) :: Link -link %L_FLAGS% /OUT:%BUILD_DIR%\main.exe %BUILD_DIR%\main.obj kernel32.lib +link %L_FLAGS% /OUT:%BUILD_DIR%\main.exe %OBJS% kernel32.lib :: Test program set SRC_FILE=test -- cgit v1.3