From 17331ec1aa0b09a42f2884804d2e2b78a7d38c9d Mon Sep 17 00:00:00 2001
From: "Nicolas \"Pixel\" Noble" <pixel@nobis-crew.org>
Date: Mon, 7 Dec 2009 20:50:49 +0100
Subject: Adding gl-glue to the win32 build.

---
 Makefile.mingw32 | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/Makefile.mingw32 b/Makefile.mingw32
index 94e3bc6..4d74528 100644
--- a/Makefile.mingw32
+++ b/Makefile.mingw32
@@ -3,6 +3,7 @@ ifeq ($(SYSTEM),Darwin)
 CC = i386-mingw32-gcc
 CXX = i386-mingw32-g++
 LD = i386-mingw32-g++
+AS = i386-mingw32-gcc -c
 STRIP = i386-mingw32-strip --strip-unneeded
 WINDRES = i386-mingw32-windres
 else
@@ -10,6 +11,7 @@ ifeq ($(SYSTEM),MINGW32_NT-5.1)
 CC = gcc
 CXX = g++
 LD = g++
+AS = gcc -c
 STRIP = strip --strip-unneeded
 WINDRES = windres
 else
@@ -18,12 +20,14 @@ ifeq ($(DISTRIB), CentOS)
 CC = i686-pc-mingw32-gcc
 CXX = i686-pc-mingw32-g++
 LD = i686-pc-mingw32-g++
+AS = i686-pc-mingw32-gcc -c
 STRIP = i686-pc-mingw32-strip --strip-unneeded
 WINDRES = i686-pc-mingw32-windres
 else
 CC = i586-mingw32msvc-gcc
 CXX = i586-mingw32msvc-g++
 LD = i586-mingw32msvc-g++
+AS = i586-mingw32msvc-gcc -c
 STRIP = i586-mingw32msvc-strip --strip-unneeded
 WINDRES = i586-mingw32msvc-windres
 endif
@@ -166,11 +170,13 @@ lua-plugin.cc \
 lua-interface-hc.c \
 lua-interface-light-hc.c \
 
-WHOLE_SOURCES = $(BALTISOT_SOURCES) $(LUA_SOURCES) $(LUAINTERFACE_SOURCES)
+GL_GLUE = gl-glue.s
+
+WHOLE_SOURCES = $(BALTISOT_SOURCES) $(LUA_SOURCES) $(LUAINTERFACE_SOURCES) $(GL_GLUE)
 
 LUAINTERFACE_OBJECTS = $(addsuffix .o, $(notdir $(basename $(LUAINTERFACE_SOURCES))))
 LUAINTERFACE_MAIN_OBJECTS = $(addsuffix .o, $(notdir $(basename $(LUAINTERFACE_MAIN_SOURCES))))
-LUAINTERFACE_DLL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(BALTISOT_SOURCES))))
+LUAINTERFACE_DLL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(BALTISOT_SOURCES) $(GL_GLUE))))
 LUAINTERFACE_LIGHT_OBJECTS = lua-interface-light.o $(addsuffix .o, $(notdir $(basename $(LUAINTERFACE_LIGHT_SOURCES))))
 
 ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES))))
@@ -216,6 +222,12 @@ clean:
 %.dep : %.cc
 	$(CXX) $(CPPFLAGS) -M -MF $@ $<
 
+gl-glue.dep:
+	touch gl-glue.dep
+
+gl-glue.s:
+	src/generate-gl-glue.sh mingw32 > gl-glue.s
+
 lua-interface-hc.c : lua-interface.lua
 	bin2c $< $@ lua_interface_lua
 
-- 
cgit v1.2.3