mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
fix build on windows
This commit is contained in:
parent
a690a9233e
commit
da2672e231
18
Makefile
18
Makefile
@ -5,10 +5,18 @@ LDFLAGS = -Wl,--enable-stdcall-fixup -s -static -shared
|
|||||||
CFLAGS = -Iinc -O2 -march=i486 -Wall
|
CFLAGS = -Iinc -O2 -march=i486 -Wall
|
||||||
LIBS = -lgdi32 -lwinmm -ldbghelp -lole32
|
LIBS = -lgdi32 -lwinmm -ldbghelp -lole32
|
||||||
|
|
||||||
COMMIT := $(shell git describe --match=NeVeRmAtCh --always --dirty || echo "UNKNOWN")
|
COMMIT := $(shell git describe --match=NeVeRmAtCh --always --dirty || echo UNKNOWN)
|
||||||
BRANCH := $(shell git rev-parse --abbrev-ref HEAD || echo "UNKNOWN")
|
BRANCH := $(shell git rev-parse --abbrev-ref HEAD || echo UNKNOWN)
|
||||||
ECOMMIT := $(shell echo "#define GIT_COMMIT" \"$(COMMIT)\" > inc/git.h)
|
|
||||||
EBRANCH := $(shell echo "#define GIT_BRANCH" \"$(BRANCH)\" >> inc/git.h)
|
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)
|
||||||
|
else
|
||||||
|
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
|
CC = i686-w64-mingw32-gcc
|
||||||
WINDRES ?= i686-w64-mingw32-windres
|
WINDRES ?= i686-w64-mingw32-windres
|
||||||
@ -30,4 +38,4 @@ $(TARGET): $(OBJS)
|
|||||||
$(CC) $(LDFLAGS) -o $@ $^ exports.def $(LIBS)
|
$(CC) $(LDFLAGS) -o $@ $^ exports.def $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(TARGET) $(OBJS)
|
$(RM) $(TARGET) $(OBJS) || del $(TARGET) $(subst /,\\,$(OBJS))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user