mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-26 00:21:57 +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:
|
||||
# - use STRIP= on gmake command-line
|
||||
# - edit this makefile to set STRIP to the empty string
|
||||
#
|
||||
# To disable symlinks:
|
||||
# - use LN= on gmake command-line
|
||||
|
||||
AR ?= ar
|
||||
INSTALL ?= install
|
||||
@ -104,8 +107,7 @@ endif
|
||||
|
||||
lib/$(LIB.SHARED): $(LIB.SOBJS)
|
||||
$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||
else
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
|
||||
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
|
||||
endif
|
||||
@ -141,8 +143,7 @@ lib/$(LIB.STATIC.MX): $(LIB.OBJS.MX)
|
||||
|
||||
lib/$(LIB.SHARED.MX): $(LIB.SOBJS.MX)
|
||||
$(LD) $(LDFLAGS.SO.MX) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||
else
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED.MX) lib/$(LIB.SONAME.MX)
|
||||
$(LN) $(LIB.SHARED.MX) lib/$(LIB.DEVLNK.MX)
|
||||
endif
|
||||
@ -224,12 +225,16 @@ ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||
$(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/
|
||||
else
|
||||
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
|
||||
endif
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
|
||||
endif
|
||||
|
||||
# development files
|
||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
|
||||
else
|
||||
endif
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
|
||||
endif
|
||||
$(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)/
|
||||
else
|
||||
$(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) $(LIBDIR)/
|
||||
endif
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.SONAME.MX)
|
||||
endif
|
||||
# development files
|
||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) $(LIBDIR)/
|
||||
else
|
||||
endif
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.DEVLNK.MX)
|
||||
endif
|
||||
$(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/
|
||||
|
@ -3,9 +3,10 @@ GLEW_DEST = /usr
|
||||
BINDIR = /usr/bin
|
||||
LIBDIR = /usr/lib/mingw
|
||||
INCDIR = /usr/include/mingw/GL
|
||||
CC = gcc -mno-cygwin
|
||||
# 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
|
||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||
LDFLAGS.EXTRA = -L$(LIBDIR)
|
||||
|
@ -1,8 +1,9 @@
|
||||
NAME = GLEW
|
||||
GLEW_DEST ?= /usr
|
||||
CC = cc
|
||||
# use gcc for linking, with ld it does not work
|
||||
LD = cc
|
||||
CC := cc
|
||||
LD := cc
|
||||
LN :=
|
||||
LDFLAGS.EXTRA =
|
||||
LIBDIR = $(GLEW_DEST)/lib
|
||||
LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11
|
||||
|
@ -4,9 +4,11 @@
|
||||
# $ make SYSTEM=linux-mingw32
|
||||
#
|
||||
|
||||
NAME = glew32
|
||||
CC = i586-mingw32msvc-gcc
|
||||
LD = i586-mingw32msvc-ld
|
||||
NAME := glew32
|
||||
CC := i586-mingw32msvc-gcc
|
||||
LD := i586-mingw32msvc-ld
|
||||
LN :=
|
||||
STRIP :=
|
||||
CFLAGS.SO = -DGLEW_BUILD
|
||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||
WARN = -Wall -W
|
||||
|
@ -4,9 +4,11 @@
|
||||
# $ make SYSTEM=linux-mingw64
|
||||
#
|
||||
|
||||
NAME = glew32
|
||||
CC = amd64-mingw32msvc-gcc
|
||||
LD = amd64-mingw32msvc-ld
|
||||
NAME := glew32
|
||||
CC := amd64-mingw32msvc-gcc
|
||||
LD := amd64-mingw32msvc-ld
|
||||
LN :=
|
||||
STRIP :=
|
||||
CFLAGS.SO = -DGLEW_BUILD
|
||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||
WARN = -Wall -W
|
||||
|
@ -1,7 +1,8 @@
|
||||
NAME = glew32
|
||||
CC = gcc
|
||||
# use gcc for linking, with ld it does not work
|
||||
LD = gcc
|
||||
CC := gcc
|
||||
LD := gcc
|
||||
LN :=
|
||||
CFLAGS.SO = -DGLEW_BUILD
|
||||
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
|
||||
LDFLAGS.EXTRA = -L/mingw/lib
|
||||
|
Loading…
Reference in New Issue
Block a user