d3d8 too
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f2dd0ac3f1
commit
9a6a0e7393
12 changed files with 354 additions and 65 deletions
|
|
@ -42,10 +42,28 @@ sub cobjs {
|
|||
return $r;
|
||||
}
|
||||
|
||||
|
||||
sub dx8_detect_block {
|
||||
return <<'EOF';
|
||||
!if [where d3d8.h >nul 2>nul]
|
||||
!if [for /f "delims=" %P in ('where d3d8.h 2^>nul') do @echo DX8_FLAGS = /DMW_DIRECTX8 /I"%~dpP">dx8flags.mk]
|
||||
!endif
|
||||
!else
|
||||
!if [echo DX8_FLAGS =>dx9flags.mk]
|
||||
!endif
|
||||
!endif
|
||||
!if exist("dx8flags.mk")
|
||||
!include "dx8flags.mk"
|
||||
!else
|
||||
DX8_FLAGS =
|
||||
!endif
|
||||
EOF
|
||||
}
|
||||
|
||||
sub dx9_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_DIRECTX /I"%~dpP">dx9flags.mk]
|
||||
!if [for /f "delims=" %P in ('where d3d9.h 2^>nul') do @echo DX9_FLAGS = /DMW_DIRECTX9 /I"%~dpP">dx9flags.mk]
|
||||
!endif
|
||||
!else
|
||||
!if [echo DX9_FLAGS =>dx9flags.mk]
|
||||
|
|
@ -82,6 +100,8 @@ sub generate {
|
|||
my $lib = "";
|
||||
my $c_dllout = "";
|
||||
my $c_dllafter = "";
|
||||
my $dx8_flags = "";
|
||||
my $dx8_block = "";
|
||||
my $dx9_flags = "";
|
||||
my $dx9_block = "";
|
||||
|
||||
|
|
@ -108,9 +128,8 @@ sub generate {
|
|||
$inc = "/I";
|
||||
$dll = "/DLL";
|
||||
|
||||
# DX9 headers aren't part of every MSVC/Windows SDK install, so probe
|
||||
# PATH for a d3d9.h at build time (on the machine actually running
|
||||
# nmake) rather than baking in a yes/no here.
|
||||
$dx8_flags = "\$(DX8_FLAGS)";
|
||||
$dx8_block = dx8_detect_block();
|
||||
$dx9_flags = "\$(DX9_FLAGS)";
|
||||
$dx9_block = dx9_detect_block();
|
||||
}
|
||||
|
|
@ -135,7 +154,8 @@ sub generate {
|
|||
$needlibs = "${lib}clib3r.lib";
|
||||
$c_dllout = "option implib=src${dir}Mw.lib";
|
||||
|
||||
$dx9_flags = "${def}MW_DIRECTX";
|
||||
$dx8_flags = "${def}MW_DIRECTX8";
|
||||
$dx9_flags = "${def}MW_DIRECTX9";
|
||||
}
|
||||
|
||||
open(OUT, ">", $output);
|
||||
|
|
@ -147,7 +167,7 @@ sub generate {
|
|||
print(OUT "\n");
|
||||
}
|
||||
print(OUT
|
||||
"MW_CFLAGS = ${cdll} ${inc}include ${inc}external${dir}libz${dir}include ${def}_MILSKO ${def}_MILSKO_BUILD ${def}USE_GDI ${def}USE_STB_IMAGE ${def}STBI_NO_SIMD ${def}USE_GDI_TEXT ${def}MW_OPENGL ${dx9_flags}\n"
|
||||
"MW_CFLAGS = ${cdll} ${inc}include ${inc}external${dir}libz${dir}include ${def}_MILSKO ${def}_MILSKO_BUILD ${def}USE_GDI ${def}USE_STB_IMAGE ${def}STBI_NO_SIMD ${def}USE_GDI_TEXT ${def}MW_OPENGL ${dx8_flags} ${dx9_flags}\n"
|
||||
);
|
||||
print(OUT "MW_LDFLAGS = $dll\n");
|
||||
print(OUT "EXE_CFLAGS = ${inc}include\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue