diff --git a/Makefile b/Makefile index 38ab41c..3abf9f9 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/inc/debug.h b/inc/debug.h index 6ac7f7b..be19a05 100644 --- a/inc/debug.h +++ b/inc/debug.h @@ -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;