1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00

fix build with gmake and old win-builds

This commit is contained in:
FunkyFr3sh 2024-09-13 13:54:45 +02:00
parent 128a4b95f1
commit 01b1ff62e5
2 changed files with 15 additions and 14 deletions

View File

@ -2,7 +2,7 @@
TARGET = ddraw.dll
LDFLAGS = -Wl,--enable-stdcall-fixup -s -static -shared
CFLAGS = -Iinc -O2 -march=i486 -Wall
CFLAGS = -Iinc -O2 -march=i486 -Wall -std=c99
LIBS = -lgdi32 -lwinmm -ldbghelp -lole32
COMMIT := $(shell git describe --match=NeVeRmAtCh --always --dirty || echo UNKNOWN)
@ -10,13 +10,20 @@ BRANCH := $(shell git rev-parse --abbrev-ref HEAD || echo UNKNOWN)
CMDTEST := $(shell echo \"\")
ifeq ($(CMDTEST),\"\")
# Windows
ECOMMIT := $(shell echo #define GIT_COMMIT "$(COMMIT)" > inc/git.h)
EBRANCH := $(shell echo #define GIT_BRANCH "$(BRANCH)" >> inc/git.h)
# Windows
CMDTEST := $(shell echo "\#")
ifeq ($(CMDTEST),"\#")
# gmake
ECOMMIT := $(shell echo \#define GIT_COMMIT "$(COMMIT)" > inc/git.h)
EBRANCH := $(shell echo \#define GIT_BRANCH "$(BRANCH)" >> inc/git.h)
else
ECOMMIT := $(shell echo #define GIT_COMMIT "$(COMMIT)" > inc/git.h)
EBRANCH := $(shell echo #define GIT_BRANCH "$(BRANCH)" >> inc/git.h)
endif
else
# Either *nix or Windows with sh.exe (e.g. w64devkit)
ECOMMIT := $(shell echo \#define GIT_COMMIT \"$(COMMIT)\" > inc/git.h)
EBRANCH := $(shell echo \#define GIT_BRANCH \"$(BRANCH)\" >> inc/git.h)
# Either *nix or Windows with BusyBox (e.g. w64devkit)
ECOMMIT := $(shell echo \#define GIT_COMMIT \"$(COMMIT)\" > inc/git.h)
EBRANCH := $(shell echo \#define GIT_BRANCH \"$(BRANCH)\" >> inc/git.h)
endif
CC = i686-w64-mingw32-gcc

View File

@ -28,13 +28,7 @@ void dbg_dump_dds_blt_fast_flags(DWORD flags);
void dbg_dump_dds_lock_flags(DWORD flags);
char* dbg_d3d9_hr_to_str(HRESULT hr);
char* dbg_mes_to_str(int id);
void __cdecl dbg_invoke_watson(
_In_opt_z_ wchar_t const*,
_In_opt_z_ wchar_t const*,
_In_opt_z_ wchar_t const*,
_In_ unsigned int,
_In_ uintptr_t);
void __cdecl dbg_invoke_watson(wchar_t const*, wchar_t const*, wchar_t const*, unsigned int, uintptr_t);
extern double g_dbg_frame_time;
extern DWORD g_dbg_frame_count;