From d04fd20cecd015ec2bfdf44230aef5151dc60248 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sat, 27 Sep 2014 11:34:59 +1000 Subject: [PATCH 1/3] Touch-up: Sort the enums (tokens) in a stable manner for consistency in include files. --- auto/bin/parse_spec.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl index df60ace..00fdde9 100755 --- a/auto/bin/parse_spec.pl +++ b/auto/bin/parse_spec.pl @@ -350,7 +350,12 @@ foreach my $spec (sort @speclist) if (${$tokens}{$b} =~ /_/) { 1 } else { - hex ${$tokens}{$a} <=> hex ${$tokens}{$b} + if (hex ${$tokens}{$a} eq hex ${$tokens}{$b}) + { + $a cmp $b + } else { + hex ${$tokens}{$a} <=> hex ${$tokens}{$b} + } } } } From b9be4b6c9915420b0d2ecc3c20151402c7c1af18 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sat, 27 Sep 2014 11:51:15 +1000 Subject: [PATCH 2/3] GLEW Bug #215 Readme - is wrong https://sourceforge.net/p/glew/bugs/215/ --- README.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index a609a15..c60fd18 100644 --- a/README.txt +++ b/README.txt @@ -4,6 +4,8 @@ If you downloaded the tarball from the GLEW website, you just need to: Unix: + make extensions + make sudo -s @@ -14,7 +16,7 @@ If you downloaded the tarball from the GLEW website, you just need to: Windows: - use the project file in build/vc6/ + use the project file in build/vc12/ If you wish to build GLEW from scratch (update the extension data from the net or add your own extension information), you need a Unix @@ -22,3 +24,8 @@ environment (including wget, perl, and GNU make). The extension data is regenerated from the top level source directory with: make extensions + +An alternative to generating the GLEW sources from scratch is to +download a pre-generated (unsupported) snapshot: + + https://sourceforge.net/projects/glew/files/glew/snapshots/ From f796232672608c5ecfb30eab4c5183e6f2ac3dc9 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sat, 27 Sep 2014 13:05:04 +1000 Subject: [PATCH 3/3] For mingw builds, define GLEW_BUILD unconditionally for shared libs only. --- Makefile | 4 ++-- config/Makefile.cygming | 5 ++--- config/Makefile.linux-mingw-w64 | 5 ++--- config/Makefile.linux-mingw32 | 5 ++--- config/Makefile.linux-mingw64 | 9 ++++----- config/Makefile.mingw | 5 ++--- 6 files changed, 14 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 140f03a..6a9803c 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wgl tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h @mkdir -p $(dir $@) - $(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< + $(CC) -DGLEW_NO_GLU -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< # Force re-write of glew.pc, GLEW_DEST can vary @@ -166,7 +166,7 @@ tmp/$(SYSTEM)/mx/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h @mkdir -p $(dir $@) - $(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< + $(CC) -DGLEW_NO_GLU -DGLEW_MX -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< # Force re-write of glewmx.pc, GLEW_DEST can vary diff --git a/config/Makefile.cygming b/config/Makefile.cygming index afdd851..a356c5c 100644 --- a/config/Makefile.cygming +++ b/config/Makefile.cygming @@ -7,7 +7,6 @@ INCDIR = /usr/include/mingw/GL CC := gcc -mno-cygwin LD := gcc -mno-cygwin LN := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L$(LIBDIR) WARN = -Wall -W @@ -16,10 +15,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux-mingw-w64 b/config/Makefile.linux-mingw-w64 index 95275cb..bedf166 100644 --- a/config/Makefile.linux-mingw-w64 +++ b/config/Makefile.linux-mingw-w64 @@ -9,7 +9,6 @@ CC := i686-w64-mingw32-gcc LD := i686-w64-mingw32-ld LN := STRIP := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 @@ -17,10 +16,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux-mingw32 b/config/Makefile.linux-mingw32 index d9573a7..510e2a9 100644 --- a/config/Makefile.linux-mingw32 +++ b/config/Makefile.linux-mingw32 @@ -9,7 +9,6 @@ CC := i586-mingw32msvc-gcc LD := i586-mingw32msvc-ld LN := STRIP := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 @@ -17,10 +16,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux-mingw64 b/config/Makefile.linux-mingw64 index 6093351..65c1949 100644 --- a/config/Makefile.linux-mingw64 +++ b/config/Makefile.linux-mingw64 @@ -5,11 +5,10 @@ # NAME := glew32 -CC := amd64-mingw32msvc-gcc -LD := amd64-mingw32msvc-ld +CC := i686-w64-mingw32-gcc +LD := i686-w64-mingw32-ld LN := STRIP := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 @@ -17,10 +16,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.mingw b/config/Makefile.mingw index e74fd3c..f1fb194 100644 --- a/config/Makefile.mingw +++ b/config/Makefile.mingw @@ -3,7 +3,6 @@ NAME = glew32 CC := gcc LD := gcc LN := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L/mingw/lib WARN = -Wall -W @@ -12,10 +11,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX)