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
|
||||
## THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
GLEW_DEST ?= /usr
|
||||
|
||||
include config/version
|
||||
|
||||
LIBDIR ?= $(GLEW_DEST)/lib
|
||||
TARDIR = ../glew-$(GLEW_VERSION)
|
||||
TARBALL = ../glew_$(GLEW_VERSION).tar.gz
|
||||
|
||||
SHELL = /bin/sh
|
||||
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)
|
||||
@ -46,9 +40,11 @@ else
|
||||
$(error "Platform '$(SYSTEM)' not supported")
|
||||
endif
|
||||
|
||||
ifeq (undefined, $(origin SHARED_OBJ_EXT))
|
||||
SHARED_OBJ_EXT = o
|
||||
endif
|
||||
GLEW_DEST ?= /usr
|
||||
LIBDIR ?= $(GLEW_DEST)/lib
|
||||
SHARED_OBJ_EXT ?= o
|
||||
TARDIR = ../glew-$(GLEW_VERSION)
|
||||
TARBALL = ../glew_$(GLEW_VERSION).tar.gz
|
||||
|
||||
AR = ar
|
||||
INSTALL = install
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define __GLEXT_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.
|
||||
@ -28,7 +28,7 @@
|
||||
/* <windef.h> */
|
||||
#ifndef APIENTRY
|
||||
#define GLEW_APIENTRY_DEFINED
|
||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
# if defined(__MINGW32__)
|
||||
# define APIENTRY __stdcall
|
||||
# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
|
||||
# define APIENTRY __stdcall
|
||||
@ -37,14 +37,14 @@
|
||||
# endif
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
# if defined(__MINGW32__)
|
||||
# define GLAPI extern
|
||||
# endif
|
||||
#endif
|
||||
/* <winnt.h> */
|
||||
#ifndef CALLBACK
|
||||
#define GLEW_CALLBACK_DEFINED
|
||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
# if defined(__MINGW32__)
|
||||
# define CALLBACK __attribute__ ((__stdcall__))
|
||||
# elif (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
||||
# define CALLBACK __stdcall
|
||||
@ -81,7 +81,7 @@ typedef _W64 int ptrdiff_t;
|
||||
#endif
|
||||
|
||||
#ifndef GLAPI
|
||||
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
# if defined(__MINGW32__)
|
||||
# define GLAPI extern
|
||||
# else
|
||||
# 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
|
||||
CC = gcc -mno-cygwin
|
||||
NAME = GLEW
|
||||
GLEW_DEST ?= /usr/X11R6
|
||||
CC = cc
|
||||
# use gcc for linking, with ld it does not work
|
||||
LD = gcc -mno-cygwin
|
||||
LD = cc
|
||||
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
|
||||
LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
|
||||
LDFLAGS.EXTRA = -L/usr/X11R6/lib
|
||||
LIBDIR = $(GLEW_DEST)/lib
|
||||
LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11
|
||||
LDFLAGS.STATIC = -Wl,-Bstatic
|
||||
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
|
||||
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)
|
||||
BIN.SUFFIX =
|
||||
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
||||
LIB.DEVLNK = lib$(NAME).so
|
||||
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
|
||||
LIB.STATIC = lib$(NAME).a
|
||||
|
Loading…
Reference in New Issue
Block a user