mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 16:18:06 +02:00
a variety of fixes for MingW
This commit is contained in:
parent
b0b02507b4
commit
37aca21129
13 changed files with 135 additions and 79 deletions
25
Makefile.mgw
25
Makefile.mgw
|
|
@ -51,16 +51,23 @@
|
|||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
# MinGW core makefile updated for Mesa 7.0
|
||||
#
|
||||
# updated : by Heromyth, 2007-6-25
|
||||
# Email : zxpmyth@yahoo.com.cn
|
||||
# Bug : All the default settings work fine. But the setting X86=1 can't work.
|
||||
# The others havn't been tested yet.
|
||||
|
||||
|
||||
|
||||
.PHONY : all libgl clean realclean
|
||||
|
||||
ifeq ($(ICD),1)
|
||||
# when -std=c99 mingw will not define WIN32
|
||||
CFLAGS = -Wall -W -Werror
|
||||
CFLAGS = -Wall -Werror
|
||||
else
|
||||
# I love c89
|
||||
CFLAGS = -Wall -W -pedantic
|
||||
CFLAGS = -Wall -pedantic
|
||||
endif
|
||||
CFLAGS += -O2 -ffast-math
|
||||
|
||||
|
|
@ -72,16 +79,28 @@ else
|
|||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
all: libgl
|
||||
all: libgl libglu libglut
|
||||
|
||||
libgl: lib
|
||||
$(MAKE) -f Makefile.mgw -C src/mesa
|
||||
|
||||
libglu: libgl
|
||||
$(MAKE) -f Makefile.mgw -C src/glu/sgi
|
||||
|
||||
libglut: libglu
|
||||
$(MAKE) -f Makefile.mgw -C src/glut/glx
|
||||
|
||||
example: libglut
|
||||
$(MAKE) -f Makefile.mgw star -C progs/samples
|
||||
copy progs\samples\star.exe lib
|
||||
|
||||
lib:
|
||||
mkdir lib
|
||||
|
||||
clean:
|
||||
$(MAKE) -f Makefile.mgw clean -C src/mesa
|
||||
$(MAKE) -f Makefile.mgw clean -C src/glu/sgi
|
||||
$(MAKE) -f Makefile.mgw clean -C src/glut/glx
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,lib/*.a)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,19 @@
|
|||
#define GLAPIENTRYP GLAPIENTRY *
|
||||
#endif
|
||||
|
||||
#ifdef GLAPI
|
||||
#undef GLAPI
|
||||
#endif
|
||||
|
||||
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
|
||||
# define GLAPI __declspec(dllexport)
|
||||
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
||||
# define GLAPI __declspec(dllimport)
|
||||
# else /* for use with static link lib build of Win32 edition only */
|
||||
# define GLAPI extern
|
||||
# endif /* _STATIC_MESA support */
|
||||
|
||||
|
||||
#ifndef GLAPI
|
||||
#define GLAPI
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ extern _CRTIMP void __cdecl exit(int);
|
|||
#endif
|
||||
|
||||
/* GLUT API entry point declarations for Win32. */
|
||||
#if defined(GLUT_BUILDING_LIB) && defined(_DLL)
|
||||
#if (defined(BUILD_GLUT32) || defined(GLUT_BUILDING_LIB)) && defined(_DLL)
|
||||
# define GLUTAPI __declspec(dllexport)
|
||||
#elif defined(_DLL)
|
||||
# define GLUTAPI __declspec(dllimport)
|
||||
|
|
@ -131,8 +131,10 @@ extern _CRTIMP void __cdecl exit(int);
|
|||
# endif
|
||||
# define CALLBACK __stdcall
|
||||
typedef int (GLUTAPIENTRY *PROC)();
|
||||
typedef void *HGLRC;
|
||||
typedef void *HDC;
|
||||
#if !defined(__MINGW32__)
|
||||
typedef void *HGLRC;
|
||||
typedef void *HDC;
|
||||
#endif
|
||||
typedef unsigned long COLORREF;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -43,10 +43,9 @@
|
|||
#include "definitions.h"
|
||||
#include "primitiveStream.h"
|
||||
#include "directedLine.h"
|
||||
#include "arc.h"
|
||||
|
||||
class Backend;
|
||||
class Arc;
|
||||
typedef Arc *Arc_ptr;
|
||||
|
||||
class reflexChain{
|
||||
Real2 *queue;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
#endif
|
||||
#include <X11/Xutil.h>
|
||||
#else
|
||||
#ifdef __MINGW32__
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifndef __CYGWIN32__
|
||||
#include <mmsystem.h> /* Win32 Multimedia API header. */
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef __MINGW32__
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifndef __CYGWIN32__
|
||||
#include <mmsystem.h> /* Win32 Multimedia API header. */
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
/* The following added by Paul Garceau <pgarceau@teleport.com> */
|
||||
#if defined(__MINGW32__)
|
||||
#include <GL/gl.h>
|
||||
#include <time.h>
|
||||
#include <windows.h>
|
||||
struct timeval;
|
||||
|
|
|
|||
|
|
@ -6,16 +6,14 @@
|
|||
/* This program is freely distributable without licensing fees
|
||||
and is provided without guarantee or warrantee expressed or
|
||||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
/* These definitions are missing from windows.h */
|
||||
WINGDIAPI int WINAPI wglChoosePixelFormat(HDC, PIXELFORMATDESCRIPTOR *);
|
||||
WINGDIAPI int WINAPI wglDescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
|
||||
WINGDIAPI int WINAPI wglGetPixelFormat(HDC);
|
||||
WINGDIAPI BOOL WINAPI wglSetPixelFormat(HDC, int, PIXELFORMATDESCRIPTOR *);
|
||||
WINGDIAPI BOOL WINAPI wglSwapBuffers(HDC);
|
||||
|
||||
|
||||
/* Type definitions (conversions) */
|
||||
typedef int Visual; /* Win32 equivalent of X11 type */
|
||||
|
|
|
|||
|
|
@ -32,8 +32,14 @@
|
|||
|
||||
/* We're essentially building part of GDI here, so define this so that
|
||||
* we get the right export linkage. */
|
||||
#ifdef __MINGW32__
|
||||
#include <GL/gl.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#define _GDI32_
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#include "glapi.h"
|
||||
|
||||
#include "GL/wmesa.h" /* protos for wmesa* functions */
|
||||
|
|
|
|||
|
|
@ -1404,70 +1404,70 @@ void WMesaSwapBuffers( HDC hdc )
|
|||
* table entries. Hopefully, I'll find a better solution. The
|
||||
* dispatch table generation scripts ought to be making these dummy
|
||||
* stubs as well. */
|
||||
void gl_dispatch_stub_543(void){};
|
||||
void gl_dispatch_stub_544(void){};
|
||||
void gl_dispatch_stub_545(void){};
|
||||
void gl_dispatch_stub_546(void){};
|
||||
void gl_dispatch_stub_547(void){};
|
||||
void gl_dispatch_stub_548(void){};
|
||||
void gl_dispatch_stub_549(void){};
|
||||
void gl_dispatch_stub_550(void){};
|
||||
void gl_dispatch_stub_551(void){};
|
||||
void gl_dispatch_stub_552(void){};
|
||||
void gl_dispatch_stub_553(void){};
|
||||
void gl_dispatch_stub_554(void){};
|
||||
void gl_dispatch_stub_555(void){};
|
||||
void gl_dispatch_stub_556(void){};
|
||||
void gl_dispatch_stub_557(void){};
|
||||
void gl_dispatch_stub_558(void){};
|
||||
void gl_dispatch_stub_559(void){};
|
||||
void gl_dispatch_stub_560(void){};
|
||||
void gl_dispatch_stub_561(void){};
|
||||
void gl_dispatch_stub_565(void){};
|
||||
void gl_dispatch_stub_566(void){};
|
||||
void gl_dispatch_stub_577(void){};
|
||||
void gl_dispatch_stub_578(void){};
|
||||
void gl_dispatch_stub_603(void){};
|
||||
void gl_dispatch_stub_645(void){};
|
||||
void gl_dispatch_stub_646(void){};
|
||||
void gl_dispatch_stub_647(void){};
|
||||
void gl_dispatch_stub_648(void){};
|
||||
void gl_dispatch_stub_649(void){};
|
||||
void gl_dispatch_stub_650(void){};
|
||||
void gl_dispatch_stub_651(void){};
|
||||
void gl_dispatch_stub_652(void){};
|
||||
void gl_dispatch_stub_653(void){};
|
||||
void gl_dispatch_stub_734(void){};
|
||||
void gl_dispatch_stub_735(void){};
|
||||
void gl_dispatch_stub_736(void){};
|
||||
void gl_dispatch_stub_737(void){};
|
||||
void gl_dispatch_stub_738(void){};
|
||||
void gl_dispatch_stub_745(void){};
|
||||
void gl_dispatch_stub_746(void){};
|
||||
void gl_dispatch_stub_760(void){};
|
||||
void gl_dispatch_stub_761(void){};
|
||||
void gl_dispatch_stub_766(void){};
|
||||
void gl_dispatch_stub_767(void){};
|
||||
void gl_dispatch_stub_768(void){};
|
||||
void gl_dispatch_stub_543(void){}
|
||||
void gl_dispatch_stub_544(void){}
|
||||
void gl_dispatch_stub_545(void){}
|
||||
void gl_dispatch_stub_546(void){}
|
||||
void gl_dispatch_stub_547(void){}
|
||||
void gl_dispatch_stub_548(void){}
|
||||
void gl_dispatch_stub_549(void){}
|
||||
void gl_dispatch_stub_550(void){}
|
||||
void gl_dispatch_stub_551(void){}
|
||||
void gl_dispatch_stub_552(void){}
|
||||
void gl_dispatch_stub_553(void){}
|
||||
void gl_dispatch_stub_554(void){}
|
||||
void gl_dispatch_stub_555(void){}
|
||||
void gl_dispatch_stub_556(void){}
|
||||
void gl_dispatch_stub_557(void){}
|
||||
void gl_dispatch_stub_558(void){}
|
||||
void gl_dispatch_stub_559(void){}
|
||||
void gl_dispatch_stub_560(void){}
|
||||
void gl_dispatch_stub_561(void){}
|
||||
void gl_dispatch_stub_565(void){}
|
||||
void gl_dispatch_stub_566(void){}
|
||||
void gl_dispatch_stub_577(void){}
|
||||
void gl_dispatch_stub_578(void){}
|
||||
void gl_dispatch_stub_603(void){}
|
||||
void gl_dispatch_stub_645(void){}
|
||||
void gl_dispatch_stub_646(void){}
|
||||
void gl_dispatch_stub_647(void){}
|
||||
void gl_dispatch_stub_648(void){}
|
||||
void gl_dispatch_stub_649(void){}
|
||||
void gl_dispatch_stub_650(void){}
|
||||
void gl_dispatch_stub_651(void){}
|
||||
void gl_dispatch_stub_652(void){}
|
||||
void gl_dispatch_stub_653(void){}
|
||||
void gl_dispatch_stub_734(void){}
|
||||
void gl_dispatch_stub_735(void){}
|
||||
void gl_dispatch_stub_736(void){}
|
||||
void gl_dispatch_stub_737(void){}
|
||||
void gl_dispatch_stub_738(void){}
|
||||
void gl_dispatch_stub_745(void){}
|
||||
void gl_dispatch_stub_746(void){}
|
||||
void gl_dispatch_stub_760(void){}
|
||||
void gl_dispatch_stub_761(void){}
|
||||
void gl_dispatch_stub_766(void){}
|
||||
void gl_dispatch_stub_767(void){}
|
||||
void gl_dispatch_stub_768(void){}
|
||||
|
||||
void gl_dispatch_stub_562(void){};
|
||||
void gl_dispatch_stub_563(void){};
|
||||
void gl_dispatch_stub_564(void){};
|
||||
void gl_dispatch_stub_567(void){};
|
||||
void gl_dispatch_stub_568(void){};
|
||||
void gl_dispatch_stub_569(void){};
|
||||
void gl_dispatch_stub_580(void){};
|
||||
void gl_dispatch_stub_581(void){};
|
||||
void gl_dispatch_stub_606(void){};
|
||||
void gl_dispatch_stub_654(void){};
|
||||
void gl_dispatch_stub_655(void){};
|
||||
void gl_dispatch_stub_656(void){};
|
||||
void gl_dispatch_stub_739(void){};
|
||||
void gl_dispatch_stub_740(void){};
|
||||
void gl_dispatch_stub_741(void){};
|
||||
void gl_dispatch_stub_748(void){};
|
||||
void gl_dispatch_stub_749(void){};
|
||||
void gl_dispatch_stub_769(void){};
|
||||
void gl_dispatch_stub_770(void){};
|
||||
void gl_dispatch_stub_771(void){};
|
||||
void gl_dispatch_stub_562(void){}
|
||||
void gl_dispatch_stub_563(void){}
|
||||
void gl_dispatch_stub_564(void){}
|
||||
void gl_dispatch_stub_567(void){}
|
||||
void gl_dispatch_stub_568(void){}
|
||||
void gl_dispatch_stub_569(void){}
|
||||
void gl_dispatch_stub_580(void){}
|
||||
void gl_dispatch_stub_581(void){}
|
||||
void gl_dispatch_stub_606(void){}
|
||||
void gl_dispatch_stub_654(void){}
|
||||
void gl_dispatch_stub_655(void){}
|
||||
void gl_dispatch_stub_656(void){}
|
||||
void gl_dispatch_stub_739(void){}
|
||||
void gl_dispatch_stub_740(void){}
|
||||
void gl_dispatch_stub_741(void){}
|
||||
void gl_dispatch_stub_748(void){}
|
||||
void gl_dispatch_stub_749(void){}
|
||||
void gl_dispatch_stub_769(void){}
|
||||
void gl_dispatch_stub_770(void){}
|
||||
void gl_dispatch_stub_771(void){}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,9 @@
|
|||
# pragma disable_message(201) /* Disable unreachable code warnings */
|
||||
#endif
|
||||
|
||||
#ifdef WGLAPI
|
||||
#undef WGLAPI
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
|
||||
# if !defined(__GNUC__) /* mingw environment */
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include "vbo_context.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
|
||||
static void reset_attrfv( struct vbo_exec_context *exec );
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "vbo_context.h"
|
||||
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* NOTE: Old 'parity' issue is gone, but copying can still be
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue