Skip to content

Commit

Permalink
Fixed mingw native build. WIP now uses git rev.
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-gordon committed Nov 29, 2015
1 parent aaeed2b commit 06ce376
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 12 additions & 2 deletions Makefile
Expand Up @@ -35,15 +35,19 @@ VERSION_COPYRIGHTS = "$(APP_NAME) $(VERSION_FULL) $(COPYRIGHTS)"
VPATH ?= .

### extract svn revision
SVNREVISION := $(shell svnversion -n $(VPATH))
GITREVISION := $(shell git rev-parse --short HEAD)

DEFINES = -DAPP_NAME_FULL='"$(APP_NAME) WIP Rev: $(SVNREVISION)"'
DEFINES = -DAPP_NAME_FULL='"$(APP_NAME) WIP Rev: $(GITREVISION)"'
#DEFINES = -DAPP_NAME_FULL='"$(APP_NAME) $(VERSION_MAJ).$(VERSION_MIN)"'
#DEFINES += -DAPP_WVER='$(VERSION_MAJ),$(VERSION_MIN),$(VERSION_REV),0'
#DEFINES += -DAPP_COPYRIGHTS='"$(COPYRIGHTS)"'
DEFINES += -DAPP_YEAR='"$(APP_YEAR)"' -DVERSION_COPYRIGHTS='$(VERSION_COPYRIGHTS)'

ifneq ($(DEBUG),y)
CFLAGS = -Wall -O3
else
CFLAGS = -Wall -g -O0
endif
CFLAGS += $(DEFINES)
LFLAGS =

Expand Down Expand Up @@ -145,6 +149,12 @@ ifeq ($(PLATFORM),win32)
ifneq ($(HOSTOS),win32)
# in Debian: apt:mingw32
CROSS_COMPILE ?= i586-mingw32msvc-
else
ifeq ($(SDL_LIB),sdl)
CFLAGS += -DSDL_MAJOR_VERSION=1
else
CFLAGS += -DSDL_MAJOR_VERSION=2
endif
endif
CC := $(CROSS_COMPILE)$(CC)
CXX := $(CROSS_COMPILE)$(CXX)
Expand Down
1 change: 0 additions & 1 deletion system_sdl.h
Expand Up @@ -28,7 +28,6 @@
# include <SDL/SDL_version.h>
# ifdef WANT_WMINFO
# include <SDL/SDL_syswm.h>
#error why am i here
# endif
# else
# include <SDL.h>
Expand Down

0 comments on commit 06ce376

Please sign in to comment.