summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-21 11:27:22 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-21 11:27:22 -0600
commit005eea249c2565cd33bb7c5f599040ead1ef99a5 (patch)
tree2f3124d5d6070be0c2ed6368d58681d9ca5269f4 /progs
parent9747de8ec68aa364a2009ea2bfbaeb48d73a758f (diff)
Fix a number of MINGW32 issues (Zhang <zxpmyth@yahoo.com.cn>)mesa_7_0_1_rc1
Diffstat (limited to 'progs')
-rw-r--r--progs/samples/Makefile.mgw33
1 files changed, 29 insertions, 4 deletions
diff --git a/progs/samples/Makefile.mgw b/progs/samples/Makefile.mgw
index 1193540578..3b2fd785de 100644
--- a/progs/samples/Makefile.mgw
+++ b/progs/samples/Makefile.mgw
@@ -26,6 +26,15 @@
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
+# MinGW samples makefile updated for Mesa 7.0
+#
+# Updated : by Heromyth, on 2007-7-21
+# Email : zxpmyth@yahoo.com.cn
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# The others havn't been tested yet.
+# 2) The generated DLLs are *not* compatible with the ones built
+# with the other compilers like VC8, especially for GLUT.
+# 3) Although more tests are needed, it can be used individually!
#
# Available options:
@@ -44,15 +53,31 @@
TOP = ../..
+include $(TOP)/configs/config.mgw
+ALL_USING_STDCALL ?= 1
+GL_USING_STDCALL ?= 1
+GLUT_USING_STDCALL ?= 1
+
CC = mingw32-gcc
-CFLAGS = -Wall -W -pedantic
+CFLAGS = -Wall -pedantic
CFLAGS += -O2 -ffast-math
CFLAGS += -I$(TOP)/include -I../util
ifeq ($(FX),1)
-CFLAGS += -DFX
+ CFLAGS += -DFX
+endif
+
+CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK
+
+ifeq ($(GL_USING_STDCALL),0)
+ CFLAGS += -DGL_NO_STDCALL
+endif
+
+ifeq ($(GLUT_USING_STDCALL),1)
+ CFLAGS += -D_STDCALL_SUPPORTED
+else
+ CFLAGS += -DGLUT_NO_STDCALL
endif
-CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK -D_STDCALL_SUPPORTED
-CFLAGS += -D_WINDEF_ -D_WINGDI_
+
LD = mingw32-g++
LDFLAGS = -s -L$(TOP)/lib