This commit is contained in:
Nishi 2026-09-22 10:27:37 +09:00
commit dfa8c22f1a
3 changed files with 5 additions and 22 deletions

4
NTMakefile generated
View file

@ -1,8 +1,8 @@
CC = cl /TC /c /nologo CC = cl /TC /c /nologo
LD = link /nologo LD = link /nologo
!if [where d3d9.h >nul 2>nul] !if [where /R "%DXSDK_DIR%\\Include" d3d9.h >nul 2>nul]
!if [for /f "delims=" %P in ('where d3d9.h 2^>nul') do @echo DX9_FLAGS = /DMW_DIRECT3D9 /I"%~dpP">d3d9flags.mk] !if [for /f "delims=" %P in ('where /R "%DXSDK_DIR%\\Include" d3d9.h 2^>nul') do @echo DX9_FLAGS = /DMW_DIRECT3D9 /I"%~dpP">d3d9flags.mk]
!endif !endif
!else !else
!if [echo DX9_FLAGS =>d3d9flags.mk] !if [echo DX9_FLAGS =>d3d9flags.mk]

16
WatMakefile generated
View file

@ -1,20 +1,7 @@
CC = wcc386 -bt=nt -q CC = wcc386 -bt=nt -q
LD = wlink option quiet LD = wlink option quiet
!if [where d3d9.h >nul 2>nul] MW_CFLAGS = -bd -i=include -i=external/libz/include -d_MILSKO -d_MILSKO_BUILD -dUSE_GDI -dUSE_STB_IMAGE -dSTBI_NO_SIMD -dUSE_GDI_TEXT -dMW_OPENGL
!if [for /f "delims=" %P in ('where d3d9.h 2^>nul') do @echo DX9_FLAGS = /DMW_DIRECT3D9 /I"%~dpP">d3d9flags.mk]
!endif
!else
!if [echo DX9_FLAGS =>d3d9flags.mk]
!endif
!endif
!if exist("d3d9flags.mk")
!include "d3d9flags.mk"
!else
DX9_FLAGS =
!endif
MW_CFLAGS = -bd -i=include -i=external/libz/include -d_MILSKO -d_MILSKO_BUILD -dUSE_GDI -dUSE_STB_IMAGE -dSTBI_NO_SIMD -dUSE_GDI_TEXT -dMW_OPENGL $(DX9_FLAGS)
MW_LDFLAGS = system nt_dll MW_LDFLAGS = system nt_dll
EXE_CFLAGS = -i=include EXE_CFLAGS = -i=include
EXE_LDFLAGS = system nt EXE_LDFLAGS = system nt
@ -121,7 +108,6 @@ clean: .SYMBOLIC
%erase src/widget/window.obj %erase src/widget/window.obj
%erase src/Mw.dll %erase src/Mw.dll
%erase src/Mw.lib %erase src/Mw.lib
%erase d3d9flags.mk
%erase examples/basic/box.obj %erase examples/basic/box.obj
%erase examples/basic/calculator.obj %erase examples/basic/calculator.obj
%erase examples/basic/checkbox.obj %erase examples/basic/checkbox.obj

View file

@ -44,8 +44,8 @@ sub cobjs {
sub d3d9_detect_block { sub d3d9_detect_block {
return <<'EOF'; return <<'EOF';
!if [where d3d9.h >nul 2>nul] !if [where /R "%DXSDK_DIR%\\Include" d3d9.h >nul 2>nul]
!if [for /f "delims=" %P in ('where d3d9.h 2^>nul') do @echo DX9_FLAGS = /DMW_DIRECT3D9 /I"%~dpP">d3d9flags.mk] !if [for /f "delims=" %P in ('where /R "%DXSDK_DIR%\\Include" d3d9.h 2^>nul') do @echo DX9_FLAGS = /DMW_DIRECT3D9 /I"%~dpP">d3d9flags.mk]
!endif !endif
!else !else
!if [echo DX9_FLAGS =>d3d9flags.mk] !if [echo DX9_FLAGS =>d3d9flags.mk]
@ -131,9 +131,6 @@ sub generate {
$prefobj = "file "; $prefobj = "file ";
$needlibs = "${lib}clib3r.lib"; $needlibs = "${lib}clib3r.lib";
$c_dllout = "option implib=src${dir}Mw.lib"; $c_dllout = "option implib=src${dir}Mw.lib";
$d3d9_flags = "\$(DX9_FLAGS)";
$d3d9_block = d3d9_detect_block();
} }
open(OUT, ">", $output); open(OUT, ">", $output);