defs.mk: Started implementation of support for openSUSE-supplied mingw binaries

This commit is contained in:
Jan Lindemann 2012-04-04 17:08:18 +00:00 committed by Jan Lindemann
commit 303f9345bf

View file

@ -152,6 +152,8 @@ ifeq ($(TARGET),mingw)
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
PROJECT_CFLAGS += -L/usr/i686-w64-mingw32/sys-root/mingw/include
PROJECT_CPPFLAGS += -L/usr/i686-w64-mingw32/sys-root/mingw/include
else
CROSS_TOOL_DIR ?= /opt/cross-tools
CROSS_TOOL_BIN_PREFIX ?= $(CROSS_TOOL_DIR)/bin/i686-pc-mingw32-
@ -499,6 +501,11 @@ else
endif
endif
ifeq ($(TARGET),mingw)
BUILD_CFLAGS += -DWIN32
BUILD_CPPFLAGS += -DWIN32
endif
ifeq ($(LIBTYPE),shared)
ifneq ($(TARGET),mingw)
BUILD_LDFLAGS += -rdynamic
@ -1351,8 +1358,14 @@ ifeq ($(USE_GLIB),true)
endif
LIBFLAGS += -ldl -lpthread
else
INCLUDE += -I$(CROSS_TOOL_DIR)/include/glib-2.0 -I$(CROSS_TOOL_DIR)/lib/glib-2.0/include
LIBFLAGS += -lglib-2.0
ifneq ($(wildcard $(CROSS_TOOL_DIR)/include/glib-2.0),)
INCLUDE += -I$(CROSS_TOOL_DIR)/include/glib-2.0 -I$(CROSS_TOOL_DIR)/lib/glib-2.0/include
LIBFLAGS += -lglib-2.0
else
PROJECT_CFLAGS += $(shell /usr/bin/i686-w64-mingw32-pkg-config --cflags glib-2.0)
PROJECT_CPPFLAGS += $(shell /usr/bin/i686-w64-mingw32-pkg-config --cflags glib-2.0)
LIBFLAGS += $(shell /usr/bin/i686-w64-mingw32-pkg-config --libs glib-2.0)
endif
endif
endif