mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-22 13:55:07 +00:00
Optional symlink step for GLEW build. For Cygwin, Mingw32, etc.
This commit is contained in:
parent
af5a34cb76
commit
0af3be62b0
20
Makefile
20
Makefile
@ -56,6 +56,9 @@ DIST_SRC_TGZ = glew-$(GLEW_VERSION).tgz
|
|||||||
# To disable stripping of binaries either:
|
# To disable stripping of 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
|
||||||
|
#
|
||||||
|
# To disable symlinks:
|
||||||
|
# - use LN= on gmake command-line
|
||||||
|
|
||||||
AR ?= ar
|
AR ?= ar
|
||||||
INSTALL ?= install
|
INSTALL ?= install
|
||||||
@ -104,8 +107,7 @@ endif
|
|||||||
|
|
||||||
lib/$(LIB.SHARED): $(LIB.SOBJS)
|
lib/$(LIB.SHARED): $(LIB.SOBJS)
|
||||||
$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
||||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
ifneq ($(LN),)
|
||||||
else
|
|
||||||
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
|
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
|
||||||
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
|
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
|
||||||
endif
|
endif
|
||||||
@ -141,8 +143,7 @@ lib/$(LIB.STATIC.MX): $(LIB.OBJS.MX)
|
|||||||
|
|
||||||
lib/$(LIB.SHARED.MX): $(LIB.SOBJS.MX)
|
lib/$(LIB.SHARED.MX): $(LIB.SOBJS.MX)
|
||||||
$(LD) $(LDFLAGS.SO.MX) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
$(LD) $(LDFLAGS.SO.MX) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
||||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
ifneq ($(LN),)
|
||||||
else
|
|
||||||
$(LN) $(LIB.SHARED.MX) lib/$(LIB.SONAME.MX)
|
$(LN) $(LIB.SHARED.MX) lib/$(LIB.SONAME.MX)
|
||||||
$(LN) $(LIB.SHARED.MX) lib/$(LIB.DEVLNK.MX)
|
$(LN) $(LIB.SHARED.MX) lib/$(LIB.DEVLNK.MX)
|
||||||
endif
|
endif
|
||||||
@ -224,12 +225,16 @@ ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
|||||||
$(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/
|
$(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/
|
||||||
else
|
else
|
||||||
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
|
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
|
||||||
|
endif
|
||||||
|
ifneq ($(LN),)
|
||||||
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
|
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# development files
|
# development files
|
||||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||||
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
|
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
|
||||||
else
|
endif
|
||||||
|
ifneq ($(LN),)
|
||||||
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
|
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
|
||||||
endif
|
endif
|
||||||
$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
|
$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
|
||||||
@ -242,12 +247,15 @@ ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
|||||||
$(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) $(BINDIR)/
|
$(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) $(BINDIR)/
|
||||||
else
|
else
|
||||||
$(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) $(LIBDIR)/
|
$(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) $(LIBDIR)/
|
||||||
|
endif
|
||||||
|
ifneq ($(LN),)
|
||||||
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.SONAME.MX)
|
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.SONAME.MX)
|
||||||
endif
|
endif
|
||||||
# development files
|
# development files
|
||||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||||
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) $(LIBDIR)/
|
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) $(LIBDIR)/
|
||||||
else
|
endif
|
||||||
|
ifneq ($(LN),)
|
||||||
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.DEVLNK.MX)
|
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.DEVLNK.MX)
|
||||||
endif
|
endif
|
||||||
$(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/
|
$(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/
|
||||||
|
@ -3,9 +3,10 @@ GLEW_DEST = /usr
|
|||||||
BINDIR = /usr/bin
|
BINDIR = /usr/bin
|
||||||
LIBDIR = /usr/lib/mingw
|
LIBDIR = /usr/lib/mingw
|
||||||
INCDIR = /usr/include/mingw/GL
|
INCDIR = /usr/include/mingw/GL
|
||||||
CC = gcc -mno-cygwin
|
|
||||||
# use gcc for linking, with ld it does not work
|
# use gcc for linking, with ld it does not work
|
||||||
LD = gcc -mno-cygwin
|
CC := gcc -mno-cygwin
|
||||||
|
LD := gcc -mno-cygwin
|
||||||
|
LN :=
|
||||||
CFLAGS.SO = -DGLEW_BUILD
|
CFLAGS.SO = -DGLEW_BUILD
|
||||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||||
LDFLAGS.EXTRA = -L$(LIBDIR)
|
LDFLAGS.EXTRA = -L$(LIBDIR)
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
NAME = GLEW
|
NAME = GLEW
|
||||||
GLEW_DEST ?= /usr
|
GLEW_DEST ?= /usr
|
||||||
CC = cc
|
|
||||||
# use gcc for linking, with ld it does not work
|
# use gcc for linking, with ld it does not work
|
||||||
LD = cc
|
CC := cc
|
||||||
|
LD := cc
|
||||||
|
LN :=
|
||||||
LDFLAGS.EXTRA =
|
LDFLAGS.EXTRA =
|
||||||
LIBDIR = $(GLEW_DEST)/lib
|
LIBDIR = $(GLEW_DEST)/lib
|
||||||
LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11
|
LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
# $ make SYSTEM=linux-mingw32
|
# $ make SYSTEM=linux-mingw32
|
||||||
#
|
#
|
||||||
|
|
||||||
NAME = glew32
|
NAME := glew32
|
||||||
CC = i586-mingw32msvc-gcc
|
CC := i586-mingw32msvc-gcc
|
||||||
LD = i586-mingw32msvc-ld
|
LD := i586-mingw32msvc-ld
|
||||||
|
LN :=
|
||||||
|
STRIP :=
|
||||||
CFLAGS.SO = -DGLEW_BUILD
|
CFLAGS.SO = -DGLEW_BUILD
|
||||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
# $ make SYSTEM=linux-mingw64
|
# $ make SYSTEM=linux-mingw64
|
||||||
#
|
#
|
||||||
|
|
||||||
NAME = glew32
|
NAME := glew32
|
||||||
CC = amd64-mingw32msvc-gcc
|
CC := amd64-mingw32msvc-gcc
|
||||||
LD = amd64-mingw32msvc-ld
|
LD := amd64-mingw32msvc-ld
|
||||||
|
LN :=
|
||||||
|
STRIP :=
|
||||||
CFLAGS.SO = -DGLEW_BUILD
|
CFLAGS.SO = -DGLEW_BUILD
|
||||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
NAME = glew32
|
NAME = glew32
|
||||||
CC = gcc
|
|
||||||
# use gcc for linking, with ld it does not work
|
# use gcc for linking, with ld it does not work
|
||||||
LD = gcc
|
CC := gcc
|
||||||
|
LD := gcc
|
||||||
|
LN :=
|
||||||
CFLAGS.SO = -DGLEW_BUILD
|
CFLAGS.SO = -DGLEW_BUILD
|
||||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||||
LDFLAGS.EXTRA = -L/mingw/lib
|
LDFLAGS.EXTRA = -L/mingw/lib
|
||||||
|
Loading…
Reference in New Issue
Block a user