From ee3bf43399aab8acdbc71854f1d873c5cd545512 Mon Sep 17 00:00:00 2001 From: Nishi Date: Tue, 22 Sep 2026 10:27:37 +0900 Subject: [PATCH] fix --- NTMakefile | 4 ++-- WatMakefile | 16 +--------------- tools/genmk.pl | 7 ++----- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/NTMakefile b/NTMakefile index 03839743..6712a8b2 100644 --- a/NTMakefile +++ b/NTMakefile @@ -1,8 +1,8 @@ CC = cl /TC /c /nologo LD = link /nologo -!if [where 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 [where /R "%DXSDK_DIR%\\Include" d3d9.h >nul 2>nul] +!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 !else !if [echo DX9_FLAGS =>d3d9flags.mk] diff --git a/WatMakefile b/WatMakefile index 07029477..04a48b8e 100644 --- a/WatMakefile +++ b/WatMakefile @@ -1,20 +1,7 @@ CC = wcc386 -bt=nt -q LD = wlink option quiet -!if [where 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] -!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_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 MW_LDFLAGS = system nt_dll EXE_CFLAGS = -i=include EXE_LDFLAGS = system nt @@ -121,7 +108,6 @@ clean: .SYMBOLIC %erase src/widget/window.obj %erase src/Mw.dll %erase src/Mw.lib - %erase d3d9flags.mk %erase examples/basic/box.obj %erase examples/basic/calculator.obj %erase examples/basic/checkbox.obj diff --git a/tools/genmk.pl b/tools/genmk.pl index e8c76959..ee4822ab 100755 --- a/tools/genmk.pl +++ b/tools/genmk.pl @@ -44,8 +44,8 @@ sub cobjs { sub d3d9_detect_block { return <<'EOF'; -!if [where 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 [where /R "%DXSDK_DIR%\\Include" d3d9.h >nul 2>nul] +!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 !else !if [echo DX9_FLAGS =>d3d9flags.mk] @@ -131,9 +131,6 @@ sub generate { $prefobj = "file "; $needlibs = "${lib}clib3r.lib"; $c_dllout = "option implib=src${dir}Mw.lib"; - - $d3d9_flags = "\$(DX9_FLAGS)"; - $d3d9_block = d3d9_detect_block(); } open(OUT, ">", $output);