feature: add build script and update .gitignore
Add build.bat for compiling WASURO with FPC 3.2.2 (x86_64-win64). Supports optional "test" argument to enable the test suite. build.bat: - Configures FPC with all source unit paths (emu, wasm, parser, sections, types, vm, test infrastructure) - Outputs to bin/WASURO.exe, intermediate units to lib/ - "build.bat test" passes -dRUN_TESTS to include test units - Debug info enabled (-gw3) - Propagates FPC exit code on failure .gitignore: - Add AGENTS.md (AI agent instructions, not project source), this file should be personal choice, not dictated at a project level.
This commit is contained in:
1 parent
3361286352
commit
ff28299132
2 files changed
+40
No files matched your search
@@ -1,2 +1,3 @@
|
|||||||
bin
|
bin
|
||||||
lib
|
lib
|
||||||
|
AGENTS.md
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
set ROOT=%~dp0
|
||||||
|
set SRC=%ROOT%src
|
||||||
|
set BIN=%ROOT%bin
|
||||||
|
set LIB=%ROOT%lib
|
||||||
|
set FPC=C:\Lazarus\fpc\3.2.2\bin\x86_64-win64\fpc.exe
|
||||||
|
|
||||||
|
set TESTFLAGS=
|
||||||
|
if "%1"=="test" set TESTFLAGS=-dRUN_TESTS
|
||||||
|
|
||||||
|
if not exist "%BIN%" mkdir "%BIN%"
|
||||||
|
if not exist "%LIB%" mkdir "%LIB%"
|
||||||
|
|
||||||
|
"%FPC%" ^
|
||||||
|
%TESTFLAGS% ^
|
||||||
|
-FE"%BIN%" ^
|
||||||
|
-FU"%LIB%" ^
|
||||||
|
-Fu"%SRC%\emu" ^
|
||||||
|
-Fu"%SRC%\wasm" ^
|
||||||
|
-Fu"%SRC%\wasm\parser" ^
|
||||||
|
-Fu"%SRC%\wasm\parser\sections" ^
|
||||||
|
-Fu"%SRC%\wasm\test" ^
|
||||||
|
-Fu"%SRC%\wasm\test\opcodes" ^
|
||||||
|
-Fu"%SRC%\wasm\test\parsers" ^
|
||||||
|
-Fu"%SRC%\wasm\test\infra" ^
|
||||||
|
-Fu"%SRC%\wasm\types" ^
|
||||||
|
-Fu"%SRC%\wasm\vm" ^
|
||||||
|
-gw3 ^
|
||||||
|
-o"%BIN%\WASURO.exe" ^
|
||||||
|
"%SRC%\project\WASURO.lpr"
|
||||||
|
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo Build failed with error code %ERRORLEVEL%
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Build succeeded: %BIN%\WASURO.exe
|
||||||
Reference in new issue
Block a user