Remove need for defining _MSC_VER when building Mesa for windows with
a non MS C compiler (MinGW). (Gregor Anich)
This commit is contained in:
@@ -53,9 +53,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
|
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
|
||||||
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
|
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
|
||||||
# define GLAPI __declspec(dllexport)
|
# define GLAPI __declspec(dllexport)
|
||||||
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
||||||
# define GLAPI __declspec(dllimport)
|
# define GLAPI __declspec(dllimport)
|
||||||
# else /* for use with static link lib build of Win32 edition only */
|
# else /* for use with static link lib build of Win32 edition only */
|
||||||
# define GLAPI extern
|
# define GLAPI extern
|
||||||
|
@@ -75,7 +75,7 @@ extern "C" {
|
|||||||
To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
|
To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
|
||||||
|
|
||||||
/* XXX This is from Win32's <process.h> */
|
/* XXX This is from Win32's <process.h> */
|
||||||
# if !defined(_MSC_VER) && !defined(__cdecl)
|
# if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__cdecl)
|
||||||
/* Define __cdecl for non-Microsoft compilers. */
|
/* Define __cdecl for non-Microsoft compilers. */
|
||||||
# define __cdecl
|
# define __cdecl
|
||||||
# define GLUT_DEFINED___CDECL
|
# define GLUT_DEFINED___CDECL
|
||||||
@@ -108,7 +108,7 @@ extern _CRTIMP void __cdecl exit(int);
|
|||||||
and redifinition of Windows system defs, also removes requirement of
|
and redifinition of Windows system defs, also removes requirement of
|
||||||
pretty much any standard windows header from this file */
|
pretty much any standard windows header from this file */
|
||||||
|
|
||||||
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
|
#if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
|
||||||
# define GLUTAPIENTRY __stdcall
|
# define GLUTAPIENTRY __stdcall
|
||||||
#else
|
#else
|
||||||
# define GLUTAPIENTRY
|
# define GLUTAPIENTRY
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#define _mesa_wgl_h_
|
#define _mesa_wgl_h_
|
||||||
|
|
||||||
|
|
||||||
#include <gl/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -40,10 +40,10 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
|
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
|
||||||
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
|
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
|
||||||
# define GLAPI __declspec(dllexport)
|
# define GLAPI __declspec(dllexport)
|
||||||
# define WGLAPI __declspec(dllexport)
|
# define WGLAPI __declspec(dllexport)
|
||||||
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
||||||
# define GLAPI __declspec(dllimport)
|
# define GLAPI __declspec(dllimport)
|
||||||
# define WGLAPI __declspec(dllimport)
|
# define WGLAPI __declspec(dllimport)
|
||||||
# else /* for use with static link lib build of Win32 edition only */
|
# else /* for use with static link lib build of Win32 edition only */
|
||||||
|
@@ -50,7 +50,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "gl\gl.h"
|
#include "GL/gl.h"
|
||||||
|
|
||||||
#if defined(_MSV_VER) && !defined(__GNUC__)
|
#if defined(_MSV_VER) && !defined(__GNUC__)
|
||||||
# pragma warning (disable:4273)
|
# pragma warning (disable:4273)
|
||||||
|
@@ -71,7 +71,7 @@ endif
|
|||||||
LDLIBS = -lgdi32
|
LDLIBS = -lgdi32
|
||||||
|
|
||||||
CC = mingw32-gcc
|
CC = mingw32-gcc
|
||||||
CFLAGS += -DBUILD_GL32 -D_OPENGL32_ -D_MSC_VER
|
CFLAGS += -DBUILD_GL32 -D_OPENGL32_
|
||||||
CFLAGS += $(INCLUDE_DIRS)
|
CFLAGS += $(INCLUDE_DIRS)
|
||||||
CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
|
CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
|
||||||
ifeq ($(FX),1)
|
ifeq ($(FX),1)
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
* Updated for Mesa 4.0 by Karl Schultz (kschultz@sourceforge.net)
|
* Updated for Mesa 4.0 by Karl Schultz (kschultz@sourceforge.net)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#if defined(NDEBUG) && defined(_MSC_VER)
|
||||||
#pragma auto_inline(on)
|
#pragma auto_inline(on)
|
||||||
#pragma inline_depth(255)
|
#pragma inline_depth(255)
|
||||||
#pragma inline_recursion(on)
|
#pragma inline_recursion(on)
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
/* Stereo and parallel not tested for Mesa 4.0. */
|
/* Stereo and parallel not tested for Mesa 4.0. */
|
||||||
#define NO_STEREO
|
#define NO_STEREO
|
||||||
#if !defined(NO_STEREO)
|
#if !defined(NO_STEREO)
|
||||||
#include "gl\glu.h"
|
#include "GL/glu.h"
|
||||||
#include "stereo.h"
|
#include "stereo.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -114,6 +114,8 @@ WMesaContext WC = NULL;
|
|||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1200
|
#if defined(_MSC_VER) && _MSC_VER >= 1200
|
||||||
#define FORCEINLINE __forceinline
|
#define FORCEINLINE __forceinline
|
||||||
|
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||||
|
#define FORCEINLINE __attribute__((always_inline))
|
||||||
#else
|
#else
|
||||||
#define FORCEINLINE __inline
|
#define FORCEINLINE __inline
|
||||||
#endif
|
#endif
|
||||||
|
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <GL\gl.h>
|
#include <GL/gl.h>
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#ifdef DDRAW
|
#ifdef DDRAW
|
||||||
#define DIRECTDRAW_VERSION 0x0100
|
#define DIRECTDRAW_VERSION 0x0100
|
||||||
|
@@ -98,10 +98,10 @@
|
|||||||
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
|
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
|
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
|
||||||
# define GLAPI __declspec(dllexport)
|
# define GLAPI __declspec(dllexport)
|
||||||
# define WGLAPI __declspec(dllexport)
|
# define WGLAPI __declspec(dllexport)
|
||||||
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
|
||||||
# define GLAPI __declspec(dllimport)
|
# define GLAPI __declspec(dllimport)
|
||||||
# define WGLAPI __declspec(dllimport)
|
# define WGLAPI __declspec(dllimport)
|
||||||
# else /* for use with static link lib build of Win32 edition only */
|
# else /* for use with static link lib build of Win32 edition only */
|
||||||
|
Reference in New Issue
Block a user