Improve MSYS2 support: MinGW-W64 detection

This commit is contained in:
Anton Kochkov 2015-07-11 02:19:20 +03:00
parent ab7c399b38
commit 2ba692a373
4 changed files with 7 additions and 3 deletions

View File

@ -115,7 +115,7 @@ EXT_SO=dll
EXT_EXE=.exe
TH_LIBS=
endif
ifneq (,$(findstring mingw32,${OSTYPE})$(findstring msys,${OSTYPE}))
ifneq (,$(findstring mingw32,${OSTYPE})$(findstring mingw64,${OSTYPE})$(findstring msys,${OSTYPE}))
CFLAGS+=-DMINGW32=1
EXT_AR=lib
EXT_SO=dll

View File

@ -24,6 +24,9 @@ else
ifneq (,$(findstring mingw32,${OSTYPE}))
PIC_CFLAGS=
else
ifneq (,$(findstring mingw64,${OSTYPE}))
PIC_CFLAGS=
else
ifneq (,$(findstring msys,${OSTYPE}))
PIC_CFLAGS=
else
@ -31,6 +34,7 @@ PIC_CFLAGS=-fPIC
endif
endif
endif
endif
ifeq ($(OSTYPE),darwin)
ARCH=$(shell uname -m)
#CFLAGS+=-arch ${ARCH}

View File

@ -28,7 +28,7 @@ SDB_URL=git://github.com/radare/sdb
PWD=$(shell pwd)
SDB_CONFIG=${PWD}/sdb-config.mk
ifneq (,$(findstring cygwin,${OSTYPE})$(findstring mingw32,${OSTYPE})$(findstring msys,${OSTYPE}))
ifneq (,$(findstring cygwin,${OSTYPE})$(findstring mingw32,${OSTYPE})$(findstring mingw64,${OSTYPE})$(findstring msys,${OSTYPE}))
CFLAGS_SHARED=
else
CFLAGS_SHARED=-fPIC

View File

@ -9,7 +9,7 @@ SOVER=${EXT_SO}
LDFLAGS+=-shared
LDFLAGS_SHARED?=-shared
else
ifneq (,$(findstring ming32,${OSTYPE})$(findstring msys,${OSTYPE}))
ifneq (,$(findstring ming32,${OSTYPE})$(findstring mingw64,${OSTYPE})$(findstring msys,${OSTYPE}))
CFLAGS+=-DMINGW32=1
EXT_SO=dll
SOVER=${EXT_SO}