make: Add support for mingw

This commit is contained in:
Jan Lindemann 2007-07-13 10:49:58 +00:00 committed by Jan Lindemann
commit 65ba4f3cfd
5 changed files with 47 additions and 9 deletions

View file

@ -48,7 +48,16 @@ else
include $(TOPDIR)/make/cfg_dist.mk
endif
LDFLAGS += -lytools -ldl -pthread
LDFLAGS += -lytools
ifeq ($(TARGET),Linux)
LDFLAGS += -ldl -pthread
endif
ifeq ($(TARGET),mingw)
CFLAGS += -D_USRDLL -DYTOOLS_EXPORTS
CPPFLAGS += -D_USRDLL -DYTOOLS_EXPORTS
endif
ARCH = @ARCH@
LD_LIB_PATH=$(TOPDIR)/lib
@ -56,6 +65,7 @@ LD_LIB_PATH=$(TOPDIR)/lib
PROJECT_CFLAGS += -gstabs+
PROJECT_CPPFLAGS += -gstabs+
ifneq ($(TARGET),mingw)
ifeq (@ARCH@,x86)
PROJECT_LDFLAGS += $(shell export PKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig; pkg-config --libs glib-2.0)
else
@ -63,3 +73,4 @@ else
PROJECT_LDFLAGS += $(shell export PKG_CONFIG_PATH=/opt/gnome/lib64/pkgconfig; pkg-config --libs glib-2.0)
endif
endif
endif