mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-22 13:55:07 +00:00
fix cygwin build
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@484 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
6416dae272
commit
790f91b5f1
14
Makefile
14
Makefile
@ -28,14 +28,8 @@
|
|||||||
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
## THE POSSIBILITY OF SUCH DAMAGE.
|
## THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
GLEW_DEST ?= /usr
|
|
||||||
|
|
||||||
include config/version
|
include config/version
|
||||||
|
|
||||||
LIBDIR ?= $(GLEW_DEST)/lib
|
|
||||||
TARDIR = ../glew-$(GLEW_VERSION)
|
|
||||||
TARBALL = ../glew_$(GLEW_VERSION).tar.gz
|
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
SYSTEM = $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
|
SYSTEM = $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
|
||||||
SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
|
SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
|
||||||
@ -46,9 +40,11 @@ else
|
|||||||
$(error "Platform '$(SYSTEM)' not supported")
|
$(error "Platform '$(SYSTEM)' not supported")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (undefined, $(origin SHARED_OBJ_EXT))
|
GLEW_DEST ?= /usr
|
||||||
SHARED_OBJ_EXT = o
|
LIBDIR ?= $(GLEW_DEST)/lib
|
||||||
endif
|
SHARED_OBJ_EXT ?= o
|
||||||
|
TARDIR = ../glew-$(GLEW_VERSION)
|
||||||
|
TARBALL = ../glew_$(GLEW_VERSION).tar.gz
|
||||||
|
|
||||||
AR = ar
|
AR = ar
|
||||||
INSTALL = install
|
INSTALL = install
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#define __GLEXT_H_
|
#define __GLEXT_H_
|
||||||
#define __gl_ATI_h_
|
#define __gl_ATI_h_
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
#if defined(_WIN32) || defined(__MINGW32__)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GLEW does not include <windows.h> to avoid name space pollution.
|
* GLEW does not include <windows.h> to avoid name space pollution.
|
||||||
@ -28,7 +28,7 @@
|
|||||||
/* <windef.h> */
|
/* <windef.h> */
|
||||||
#ifndef APIENTRY
|
#ifndef APIENTRY
|
||||||
#define GLEW_APIENTRY_DEFINED
|
#define GLEW_APIENTRY_DEFINED
|
||||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
# if defined(__MINGW32__)
|
||||||
# define APIENTRY __stdcall
|
# define APIENTRY __stdcall
|
||||||
# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
|
# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
|
||||||
# define APIENTRY __stdcall
|
# define APIENTRY __stdcall
|
||||||
@ -37,14 +37,14 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef GLAPI
|
#ifndef GLAPI
|
||||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
# if defined(__MINGW32__)
|
||||||
# define GLAPI extern
|
# define GLAPI extern
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
/* <winnt.h> */
|
/* <winnt.h> */
|
||||||
#ifndef CALLBACK
|
#ifndef CALLBACK
|
||||||
#define GLEW_CALLBACK_DEFINED
|
#define GLEW_CALLBACK_DEFINED
|
||||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
# if defined(__MINGW32__)
|
||||||
# define CALLBACK __attribute__ ((__stdcall__))
|
# define CALLBACK __attribute__ ((__stdcall__))
|
||||||
# elif (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
# elif (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
||||||
# define CALLBACK __stdcall
|
# define CALLBACK __stdcall
|
||||||
@ -81,7 +81,7 @@ typedef _W64 int ptrdiff_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLAPI
|
#ifndef GLAPI
|
||||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
# if defined(__MINGW32__)
|
||||||
# define GLAPI extern
|
# define GLAPI extern
|
||||||
# else
|
# else
|
||||||
# define GLAPI WINGDIAPI
|
# define GLAPI WINGDIAPI
|
||||||
|
19
config/Makefile.cygming
Normal file
19
config/Makefile.cygming
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
NAME = glew32
|
||||||
|
CC = gcc -mno-cygwin
|
||||||
|
# use gcc for linking, with ld it does not work
|
||||||
|
LD = gcc -mno-cygwin
|
||||||
|
ifneq (undefined, $(origin GLEW_MX))
|
||||||
|
CFLAGS.EXTRA = -DGLEW_MX
|
||||||
|
endif
|
||||||
|
CFLAGS.SO = -DGLEW_BUILD
|
||||||
|
#LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK)
|
||||||
|
LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
|
||||||
|
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||||
|
LDFLAGS.EXTRA = -L/mingw/lib
|
||||||
|
WARN = -Wall -W
|
||||||
|
POPT = -O2
|
||||||
|
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)
|
@ -1,19 +1,21 @@
|
|||||||
NAME = glew32
|
NAME = GLEW
|
||||||
CC = gcc -mno-cygwin
|
GLEW_DEST ?= /usr/X11R6
|
||||||
|
CC = cc
|
||||||
# use gcc for linking, with ld it does not work
|
# use gcc for linking, with ld it does not work
|
||||||
LD = gcc -mno-cygwin
|
LD = cc
|
||||||
ifneq (undefined, $(origin GLEW_MX))
|
ifneq (undefined, $(origin GLEW_MX))
|
||||||
CFLAGS.EXTRA = -DGLEW_MX
|
CFLAGS.EXTRA = -DGLEW_MX
|
||||||
endif
|
endif
|
||||||
CFLAGS.SO = -DGLEW_BUILD
|
LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
|
||||||
#LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK)
|
LDFLAGS.EXTRA = -L/usr/X11R6/lib
|
||||||
LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
|
LIBDIR = $(GLEW_DEST)/lib
|
||||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11
|
||||||
LDFLAGS.EXTRA = -L/mingw/lib
|
LDFLAGS.STATIC = -Wl,-Bstatic
|
||||||
|
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
BIN.SUFFIX = .exe
|
BIN.SUFFIX =
|
||||||
LIB.SONAME = lib$(NAME).dll
|
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
||||||
LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
|
LIB.DEVLNK = lib$(NAME).so
|
||||||
LIB.SHARED = $(NAME).dll
|
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
|
||||||
LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO)
|
LIB.STATIC = lib$(NAME).a
|
||||||
|
Loading…
Reference in New Issue
Block a user