Skip to content

Commit

Permalink
Merge pull request #110 from zsoltm/mingw64
Browse files Browse the repository at this point in the history
added mingw64 (msys2) platform support
  • Loading branch information
timangus committed Jun 12, 2015
2 parents 708fe69 + 31fea24 commit 76e0c51
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Makefile
Expand Up @@ -61,6 +61,13 @@ PLATFORM=$(COMPILE_PLATFORM)
endif
export PLATFORM

ifeq ($(PLATFORM),mingw32)
MINGW=1
endif
ifeq ($(PLATFORM),mingw64)
MINGW=1
endif

ifeq ($(COMPILE_ARCH),i86pc)
COMPILE_ARCH=x86
endif
Expand Down Expand Up @@ -164,7 +171,7 @@ USE_CURL=1
endif

ifndef USE_CURL_DLOPEN
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
USE_CURL_DLOPEN=0
else
USE_CURL_DLOPEN=1
Expand Down Expand Up @@ -506,7 +513,7 @@ else # ifeq darwin
# SETUP AND BUILD -- MINGW32
#############################################################################

ifeq ($(PLATFORM),mingw32)
ifdef MINGW

ifeq ($(CROSS_COMPILING),1)
# If CC is already set to something generic, we probably want to use
Expand Down Expand Up @@ -652,7 +659,7 @@ ifeq ($(PLATFORM),mingw32)
SDLDLL=SDL2.dll
endif

else # ifeq mingw32
else # ifdef MINGW

#############################################################################
# SETUP AND BUILD -- FREEBSD
Expand Down Expand Up @@ -903,7 +910,7 @@ else # ifeq sunos

endif #Linux
endif #darwin
endif #mingw32
endif #MINGW
endif #FreeBSD
endif #OpenBSD
endif #NetBSD
Expand Down Expand Up @@ -1642,7 +1649,7 @@ Q3OBJ = \
$(B)/client/con_log.o \
$(B)/client/sys_main.o

ifeq ($(PLATFORM),mingw32)
ifdef MINGW
Q3OBJ += \
$(B)/client/con_passive.o
else
Expand Down Expand Up @@ -2086,7 +2093,7 @@ ifeq ($(HAVE_VM_COMPILED),true)
endif
endif

ifeq ($(PLATFORM),mingw32)
ifdef MINGW
Q3OBJ += \
$(B)/client/win_resource.o \
$(B)/client/sys_win32.o
Expand Down Expand Up @@ -2254,7 +2261,7 @@ ifeq ($(HAVE_VM_COMPILED),true)
endif
endif

ifeq ($(PLATFORM),mingw32)
ifdef MINGW
Q3DOBJ += \
$(B)/ded/win_resource.o \
$(B)/ded/sys_win32.o \
Expand Down Expand Up @@ -2870,7 +2877,7 @@ distclean: clean toolsclean
@rm -rf $(BUILD_DIR)

installer: release
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
@$(MAKE) VERSION=$(VERSION) -C $(NSISDIR) V=$(V) \
SDLDLL=$(SDLDLL) \
USE_RENDERER_DLOPEN=$(USE_RENDERER_DLOPEN) \
Expand Down

2 comments on commit 76e0c51

@Alexpux
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake itself know when you build with MINGW. So you can simply check with if(MINGW)

@zturtleman
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for GNU make not CMake though.

Please sign in to comment.