mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-26 08:31:56 +00:00
Merge https://github.com/nigels-com/glew.git into master HEAD at Sun Nov 14 06:52:33 GMT 2021
This commit is contained in:
commit
e15487351e
4
Makefile
4
Makefile
@ -61,7 +61,6 @@ DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
|
|||||||
# To disable stripping of linked binaries either:
|
# To disable stripping of linked binaries either:
|
||||||
# - use STRIP= on gmake command-line
|
# - use STRIP= on gmake command-line
|
||||||
# - edit this makefile to set STRIP to the empty string
|
# - edit this makefile to set STRIP to the empty string
|
||||||
# (Note: STRIP does not affect the strip in the install step)
|
|
||||||
#
|
#
|
||||||
# To disable symlinks:
|
# To disable symlinks:
|
||||||
# - use LN= on gmake command-line
|
# - use LN= on gmake command-line
|
||||||
@ -77,6 +76,7 @@ DOS2UNIX ?= dos2unix -q
|
|||||||
|
|
||||||
ifneq (,$(filter debug,$(MAKECMDGOALS)))
|
ifneq (,$(filter debug,$(MAKECMDGOALS)))
|
||||||
OPT = -g
|
OPT = -g
|
||||||
|
STRIP :=
|
||||||
else
|
else
|
||||||
OPT = $(POPT)
|
OPT = $(POPT)
|
||||||
endif
|
endif
|
||||||
@ -228,7 +228,7 @@ endif
|
|||||||
|
|
||||||
install.bin: glew.bin
|
install.bin: glew.bin
|
||||||
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
|
||||||
$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
|
$(INSTALL) -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
|
||||||
|
|
||||||
install.include:
|
install.include:
|
||||||
$(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
|
||||||
|
5
config/Makefile.linux-egl-glvnd
Normal file
5
config/Makefile.linux-egl-glvnd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
include config/Makefile.linux
|
||||||
|
|
||||||
|
LDFLAGS.GL = -lEGL -lOpenGL
|
||||||
|
CFLAGS.EXTRA += -DGLEW_EGL
|
||||||
|
GLEW_NO_GLU = -DGLEW_NO_GLU
|
@ -1,17 +1,19 @@
|
|||||||
# For cross-compiling from Linux to Windows 32-bit using mingw32
|
# For cross-compiling from Linux to Windows 32-bit using mingw32
|
||||||
# http://mingw-w64.org/
|
# http://mingw-w64.org/
|
||||||
#
|
#
|
||||||
|
# Ubuntu/Debian:
|
||||||
# $ sudo apt install mingw-w64
|
# $ sudo apt install mingw-w64
|
||||||
# $ make SYSTEM=linux-mingw32
|
# $ make SYSTEM=linux-mingw32
|
||||||
|
|
||||||
NAME := glew32
|
NAME := glew32
|
||||||
HOST := i686-w64-mingw32
|
HOST := i686-w64-mingw32
|
||||||
|
GLEW_DEST ?= /usr/local/$(HOST)
|
||||||
CC := $(HOST)-gcc
|
CC := $(HOST)-gcc
|
||||||
LD := $(HOST)-ld
|
LD := $(HOST)-ld
|
||||||
LN :=
|
LN :=
|
||||||
STRIP :=
|
STRIP :=
|
||||||
LDFLAGS.GL = -L/usr/$(HOST)/lib -lopengl32 -lgdi32 -luser32 -lkernel32
|
LDFLAGS.GL = -L/usr/$(HOST)/lib -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||||
CFLAGS.EXTRA += -fno-builtin -fno-stack-protector
|
CFLAGS.EXTRA += -fno-builtin -fno-stack-protector -Wno-cast-function-type
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
BIN.SUFFIX = .exe
|
BIN.SUFFIX = .exe
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
# For cross-compiling from Linux to Windows 64-bit using mingw64
|
# For cross-compiling from Linux to Windows 64-bit using mingw64
|
||||||
# http://mingw-w64.org/
|
# http://mingw-w64.org/
|
||||||
#
|
#
|
||||||
|
# Ubuntu/Debian:
|
||||||
# $ sudo apt install mingw-w64
|
# $ sudo apt install mingw-w64
|
||||||
# $ make SYSTEM=linux-mingw64
|
# $ make SYSTEM=linux-mingw64
|
||||||
|
|
||||||
NAME := glew32
|
NAME := glew32
|
||||||
HOST := x86_64-w64-mingw32
|
HOST := x86_64-w64-mingw32
|
||||||
|
GLEW_DEST ?= /usr/local/$(HOST)
|
||||||
CC := $(HOST)-gcc
|
CC := $(HOST)-gcc
|
||||||
LD := $(HOST)-ld
|
LD := $(HOST)-ld
|
||||||
LN :=
|
LN :=
|
||||||
STRIP :=
|
STRIP :=
|
||||||
LDFLAGS.GL = -L/usr/$(HOST)/lib -lopengl32 -lgdi32 -luser32 -lkernel32
|
LDFLAGS.GL = -L/usr/$(HOST)/lib -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||||
CFLAGS.EXTRA += -fno-builtin -fno-stack-protector
|
CFLAGS.EXTRA += -fno-builtin -fno-stack-protector -Wno-cast-function-type
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
BIN.SUFFIX = .exe
|
BIN.SUFFIX = .exe
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
** Copyright (C) Nate Robins, 1997
|
** Copyright (C) Nate Robins, 1997
|
||||||
** Michael Wimmer, 1999
|
** Michael Wimmer, 1999
|
||||||
** Milan Ikits, 2002-2008
|
** Milan Ikits, 2002-2008
|
||||||
** Nigel Stewart, 2008-2019
|
** Nigel Stewart, 2008-2021
|
||||||
**
|
**
|
||||||
** visualinfo is a small utility that displays all available visuals,
|
** visualinfo is a small utility that displays all available visuals,
|
||||||
** aka. pixelformats, in an OpenGL system along with renderer version
|
** aka. pixelformats, in an OpenGL system along with renderer version
|
||||||
@ -48,18 +48,6 @@
|
|||||||
#include <GL/glxew.h>
|
#include <GL/glxew.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLEW_MX
|
|
||||||
GLEWContext _glewctx;
|
|
||||||
# define glewGetContext() (&_glewctx)
|
|
||||||
# ifdef _WIN32
|
|
||||||
WGLEWContext _wglewctx;
|
|
||||||
# define wglewGetContext() (&_wglewctx)
|
|
||||||
# elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
||||||
GLXEWContext _glxewctx;
|
|
||||||
# define glxewGetContext() (&_glxewctx)
|
|
||||||
# endif
|
|
||||||
#endif /* GLEW_MX */
|
|
||||||
|
|
||||||
typedef struct GLContextStruct
|
typedef struct GLContextStruct
|
||||||
{
|
{
|
||||||
#if defined(GLEW_OSMESA)
|
#if defined(GLEW_OSMESA)
|
||||||
@ -123,6 +111,13 @@ main (int argc, char** argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(GLEW_EGL)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Error [main]: EGL not supported by visualinfo.\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
/* create OpenGL rendering context */
|
/* create OpenGL rendering context */
|
||||||
InitContext(&ctx);
|
InitContext(&ctx);
|
||||||
@ -136,16 +131,7 @@ main (int argc, char** argv)
|
|||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
/* initialize GLEW */
|
/* initialize GLEW */
|
||||||
glewExperimental = GL_TRUE;
|
glewExperimental = GL_TRUE;
|
||||||
#ifdef GLEW_MX
|
|
||||||
err = glewContextInit(glewGetContext());
|
|
||||||
# ifdef _WIN32
|
|
||||||
err = err || wglewContextInit(wglewGetContext());
|
|
||||||
# elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
||||||
err = err || glxewContextInit(glxewGetContext());
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
err = glewInit();
|
err = glewInit();
|
||||||
#endif
|
|
||||||
if (GLEW_OK != err)
|
if (GLEW_OK != err)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err));
|
fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err));
|
||||||
|
Loading…
Reference in New Issue
Block a user