defs.mk: Repair mingw build

- Empty EXE_BASENAME leads to to EXE == .exe in mingw, fix that.
  - Start implemenation of support for distribution-supplied mingw binaries
This commit is contained in:
Jan Lindemann 2012-04-04 15:32:27 +00:00 committed by Jan Lindemann
commit e1e2f14a3f

View file

@ -59,12 +59,13 @@ MINOR_VERSION = $(shell echo $(MAJOR_MINOR_RELEASE) | cut -d. -f2)
RELEASE_VERSION = $(shell echo $(MAJOR_MINOR_RELEASE) | cut -d. -f3)
BUILD_NUMBER = $(shell echo $(DIST_VERSION) | cut -d- -f2)
CVS_RSH ?= /usr/bin/ssh
ifneq ($(EXE_BASENAME),)
ifneq ($(TARGET),mingw)
EXE ?= $(EXE_BASENAME)
else
EXE ?= $(EXE_BASENAME).exe
endif
endif
# ----- input dirs
ifeq ($(PROJECT),ytools)
@ -147,8 +148,14 @@ BUILD_CFLAGS += -DVERSION=$(HEX_VERSION)
BUILD_CPPFLAGS += -DVERSION=$(HEX_VERSION)
ifeq ($(TARGET),mingw)
CROSS_TOOL_DIR ?= /opt/cross-tools
CROSS_TOOL_BIN_PREFIX ?= $(CROSS_TOOL_DIR)/bin/i686-pc-mingw32-
ifneq ($(wildcard /usr/bin/i686-w64-mingw32-gcc),)
CROSS_TOOL_DIR ?=
CROSS_TOOL_BIN_PREFIX ?= $(CROSS_TOOL_DIR)/usr/bin/i686-w64-mingw32-
PROJECT_LDFLAGS += -L/usr/i686-w64-mingw32/sys-root/mingw/lib
else
CROSS_TOOL_DIR ?= /opt/cross-tools
CROSS_TOOL_BIN_PREFIX ?= $(CROSS_TOOL_DIR)/bin/i686-pc-mingw32-
endif
GCC = $(CROSS_TOOL_BIN_PREFIX)gcc
GPP = $(CROSS_TOOL_BIN_PREFIX)g++
STRIP = $(CROSS_TOOL_BIN_PREFIX)strip