fix build with gmake and old win-builds
This commit is contained in:
parent
128a4b95f1
commit
01b1ff62e5
2 changed files with 15 additions and 14 deletions
21
Makefile
21
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue