summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/windows/gentest.bat
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gd/libgd-src/windows/gentest.bat')
-rw-r--r--Build/source/libs/gd/libgd-src/windows/gentest.bat35
1 files changed, 35 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/windows/gentest.bat b/Build/source/libs/gd/libgd-src/windows/gentest.bat
new file mode 100644
index 00000000000..9c2cbeb7ed6
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/windows/gentest.bat
@@ -0,0 +1,35 @@
+SETLOCAL ENABLEDELAYEDEXPANSION
+@echo off
+set testsdir=%~1
+set builddir=%~2
+set CFLAGS=%~3
+set LDFLAGS=%~4
+set CC=%~5
+set LD=%~6
+set TESTMK=%~7
+set TESTLIST=%~8
+echo %*
+echo recieved !testsdir! !builddir! !CFLAGS! !LDFLAGS! !CC!
+
+copy NUL !TESTMK! > nul
+copy NUL !TESTLIST! > nul
+
+for /D %%d in (!testsdir!/*) do (
+ if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
+ echo TEST_EXES=!builddir!\tests\%%d_%%~nf.exe ^$^(TEST_EXES^) >> !TESTMK!
+ )
+)
+
+for /D %%d in (!testsdir!/*) do (
+ if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
+ echo !builddir!\%%d_%%~nf.obj: !testsdir!\%%d\%%f; ^$^(CC^) ^$^(TEST_CFLAGS^) /c ^$** /Fo:$@ >> !TESTMK!
+ )
+)
+
+for /D %%d in (!testsdir!/*) do (
+ if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
+ echo !builddir!\tests\%%d_%%~nf.exe: !builddir!\%%d_%%~nf.obj; !LD! !LDFLAGS! $** /out:$@ >> !TESTMK!
+ echo %%d_%%~nf.exe >> !TESTLIST!
+ )
+)
+ENDLOCAL \ No newline at end of file