mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-26 07:41:58 +00:00
added -lGLU to glewinfo and library version in GNUmakefile
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@8 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
067d6cbc09
commit
03a133fd8a
25
GNUmakefile
25
GNUmakefile
@ -16,31 +16,35 @@
|
|||||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
GLEW_TARGET ?= /usr
|
GLEW_TARGET ?= /usr
|
||||||
|
GLEW_VERSION = 1.0
|
||||||
|
|
||||||
CC = \cc
|
CC = \cc
|
||||||
LD = \ld
|
LD = \ld
|
||||||
INSTALL = \install
|
INSTALL = \install
|
||||||
RM = \rm -f
|
RM = \rm -f
|
||||||
|
LN = \ln -s
|
||||||
OPT = -O2
|
OPT = -O2
|
||||||
INCLUDE = -Iinclude
|
INCLUDE = -Iinclude
|
||||||
CFLAGS = $(OPT) $(INCLUDE)
|
CFLAGS = $(OPT) $(INCLUDE)
|
||||||
|
|
||||||
LIB = lib/libGLEW.so
|
LIB = libGLEW.so.$(GLEW_VERSION)
|
||||||
|
LIB.LNK = libGLEW.so
|
||||||
LIB.SRCS = src/glew.c
|
LIB.SRCS = src/glew.c
|
||||||
LIB.OBJS = $(LIB.SRCS:.c=.o)
|
LIB.OBJS = $(LIB.SRCS:.c=.o)
|
||||||
LIB.LIBS =
|
LIB.LIBS =
|
||||||
|
|
||||||
BIN = bin/glewinfo
|
BIN = glewinfo
|
||||||
BIN.SRCS = src/glewinfo.c
|
BIN.SRCS = src/glewinfo.c
|
||||||
BIN.OBJS = $(BIN.SRCS:.c=.o)
|
BIN.OBJS = $(BIN.SRCS:.c=.o)
|
||||||
BIN.LIBS = -Llib -L/usr/X11R6/lib -lglut -lGLEW -lGLU -lGL -lXmu -lX11
|
BIN.LIBS = -Llib -L/usr/X11R6/lib -lglut -lGLEW -lGLU -lGL -lXmu -lX11
|
||||||
|
|
||||||
all: $(LIB) $(BIN)
|
all: lib/$(LIB) bin/$(BIN)
|
||||||
|
|
||||||
$(LIB): $(LIB.OBJS)
|
lib/$(LIB): $(LIB.OBJS)
|
||||||
$(LD) -shared -o $@ $^ $(LIB.LIBS)
|
$(LD) -shared -o $@ $^ $(LIB.LIBS)
|
||||||
|
$(LN) $(LIB) lib/$(LIB.LNK)
|
||||||
|
|
||||||
$(BIN): $(BIN.SRCS)
|
bin/$(BIN): $(BIN.SRCS)
|
||||||
$(CC) $(CFLAGS) -o $@ $^ $(BIN.LIBS)
|
$(CC) $(CFLAGS) -o $@ $^ $(BIN.LIBS)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
@ -50,14 +54,15 @@ install: all
|
|||||||
$(INSTALL) -d -m 755 $(GLEW_TARGET)/include/GL
|
$(INSTALL) -d -m 755 $(GLEW_TARGET)/include/GL
|
||||||
$(INSTALL) -m 644 include/GL/glew.h include/GL/glxew.h $(GLEW_TARGET)/include/GL
|
$(INSTALL) -m 644 include/GL/glew.h include/GL/glxew.h $(GLEW_TARGET)/include/GL
|
||||||
$(INSTALL) -d -m 755 $(GLEW_TARGET)/lib
|
$(INSTALL) -d -m 755 $(GLEW_TARGET)/lib
|
||||||
$(INSTALL) -s -m 755 lib/libGLEW.so $(GLEW_TARGET)/lib
|
$(INSTALL) -s -m 755 lib/$(LIB) $(GLEW_TARGET)/lib
|
||||||
|
$(LN) $(GLEW_TARGET)/lib/$(LIB) $(GLEW_TARGET)/lib/$(LIB.LNK)
|
||||||
$(INSTALL) -d -m 755 $(GLEW_TARGET)/bin
|
$(INSTALL) -d -m 755 $(GLEW_TARGET)/bin
|
||||||
$(INSTALL) -s -m 755 lib/glewinfo $(GLEW_TARGET)/bin
|
$(INSTALL) -s -m 755 bin/$(BIN) $(GLEW_TARGET)/bin
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(GLEW_TARGET)/include/GL/glew.h $(GLEW_TARGET)/include/GL/glxew.h
|
$(RM) $(GLEW_TARGET)/include/GL/glew.h $(GLEW_TARGET)/include/GL/glxew.h
|
||||||
$(RM) $(GLEW_TARGET)/lib/libGLEW.so
|
$(RM) $(GLEW_TARGET)/lib/$(LIB.LNK) $(GLEW_TARGET)/lib/$(LIB)
|
||||||
$(RM) $(GLEW_TARGET)/bin/glewinfo
|
$(RM) $(GLEW_TARGET)/bin/$(BIN)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(LIB.OBJS) $(LIB) $(BIN.OBJS) $(BIN)
|
$(RM) $(LIB.OBJS) lib/$(LIB) lib/$(LIB.LNK) $(BIN.OBJS) bin/$(BIN)
|
||||||
|
@ -146,6 +146,8 @@ typedef unsigned short wchar_t;
|
|||||||
#else /* _UNIX */
|
#else /* _UNIX */
|
||||||
|
|
||||||
#define APIENTRY
|
#define APIENTRY
|
||||||
|
#define GLAPI extern
|
||||||
|
#define GLAPIENTRY
|
||||||
#define GLEW_EXPORT
|
#define GLEW_EXPORT
|
||||||
|
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
Loading…
Reference in New Issue
Block a user