fix OS detection for native mingw32/MSYS
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Tue, 16 Sep 2008 06:19:38 +0000 (06:19 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Tue, 16 Sep 2008 06:19:38 +0000 (06:19 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@53 61c419a2-8eb2-4b30-bcec-8cead039b335

Makefile

index 2200764af4daebfe2e6de5ae749eb4094a0dd83f..226fd620dd03c5fb88f4cbb641134dac9fea8b44 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
 include Makefile.conf
 
+ifeq ($(OS),MINGW32_NT-6.0)
+       OS = Win32
+endif
+
 CFLAGS     = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter
 CPPFLAGS   = 
 LDFLAGS    =
@@ -15,8 +19,8 @@ ifneq ($(MINGW),)
        AR = $(MINGWPREFIX)ar
        OS := Win32
        CPPFLAGS += -I$(MINGW)/include -D_inline=inline
-       CFLAGS   += -mms-bitfields
-       LDFLAGS  += -mms-bitfields -L$(MINGW)/lib
+       CFLAGS   += 
+       LDFLAGS  += -L$(MINGW)/lib
 
        CPPFLAGS_GLIB = -I$(MINGW)/include/glib-2.0 -I$(MINGW)/lib/glib-2.0/include
        LIBS_GLIB = -lglib-2.0
@@ -55,17 +59,16 @@ ifeq ($(OS),Linux)
        MWINDOWS =
 else ifeq ($(OS),Win32)
        CPPFLAGS += -DWIN32 -D_WIN32
-       CFLAGS +=
+       CFLAGS += -mms-bitfields
        LDFLAGS_DLL =
        LIBS = -lws2_32 -luser32 -lgdi32
        EXE = exe
        A = a
        DLL = dll
        MWINDOWS = -mwindows
-else ifeq ($(OS),Darwin)
-$(error Unsupported build OS)
+#else ifeq ($(OS),Darwin)
 else
-$(error Unsupported build OS)
+$(error Unsupported build OS: $(OS))
 endif
 
 CPPFLAGS_GLIB ?= `pkg-config glib-2.0 --cflags`