2002-12-13 08:31:58 +00:00
|
|
|
## The OpenGL Extension Wrangler Library
|
|
|
|
## Copyright (C) 2002 Milan Ikits
|
|
|
|
##
|
|
|
|
## This library is free software; you can redistribute it and/or
|
|
|
|
## modify it under the terms of the GNU Lesser General Public
|
|
|
|
## License as published by the Free Software Foundation; either
|
|
|
|
## version 2.1 of the License, or (at your option) any later version.
|
|
|
|
##
|
|
|
|
## This library is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
## Lesser General Public License for more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU Lesser General Public
|
|
|
|
## License along with this library; if not, write to the Free Software
|
|
|
|
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
GLEW_TARGET ?= /usr
|
2002-12-15 08:30:27 +00:00
|
|
|
GLEW_VERSION = 1.0
|
2002-12-13 08:31:58 +00:00
|
|
|
|
|
|
|
CC = \cc
|
|
|
|
LD = \ld
|
|
|
|
INSTALL = \install
|
|
|
|
RM = \rm -f
|
2002-12-15 08:30:27 +00:00
|
|
|
LN = \ln -s
|
2002-12-13 08:31:58 +00:00
|
|
|
OPT = -O2
|
|
|
|
INCLUDE = -Iinclude
|
|
|
|
CFLAGS = $(OPT) $(INCLUDE)
|
|
|
|
|
2002-12-15 08:30:27 +00:00
|
|
|
LIB = libGLEW.so.$(GLEW_VERSION)
|
|
|
|
LIB.LNK = libGLEW.so
|
2002-12-13 08:31:58 +00:00
|
|
|
LIB.SRCS = src/glew.c
|
|
|
|
LIB.OBJS = $(LIB.SRCS:.c=.o)
|
|
|
|
LIB.LIBS =
|
|
|
|
|
2002-12-15 08:30:27 +00:00
|
|
|
BIN = glewinfo
|
2002-12-13 08:31:58 +00:00
|
|
|
BIN.SRCS = src/glewinfo.c
|
|
|
|
BIN.OBJS = $(BIN.SRCS:.c=.o)
|
2002-12-15 08:08:49 +00:00
|
|
|
BIN.LIBS = -Llib -L/usr/X11R6/lib -lglut -lGLEW -lGLU -lGL -lXmu -lX11
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2002-12-15 08:30:27 +00:00
|
|
|
all: lib/$(LIB) bin/$(BIN)
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2002-12-15 08:30:27 +00:00
|
|
|
lib/$(LIB): $(LIB.OBJS)
|
2002-12-13 08:31:58 +00:00
|
|
|
$(LD) -shared -o $@ $^ $(LIB.LIBS)
|
2002-12-15 08:30:27 +00:00
|
|
|
$(LN) $(LIB) lib/$(LIB.LNK)
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2002-12-15 08:30:27 +00:00
|
|
|
bin/$(BIN): $(BIN.SRCS)
|
2002-12-13 08:31:58 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $^ $(BIN.LIBS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
install: all
|
|
|
|
$(INSTALL) -d -m 755 $(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
|
2002-12-15 08:30:27 +00:00
|
|
|
$(INSTALL) -s -m 755 lib/$(LIB) $(GLEW_TARGET)/lib
|
|
|
|
$(LN) $(GLEW_TARGET)/lib/$(LIB) $(GLEW_TARGET)/lib/$(LIB.LNK)
|
2002-12-13 08:31:58 +00:00
|
|
|
$(INSTALL) -d -m 755 $(GLEW_TARGET)/bin
|
2002-12-15 08:30:27 +00:00
|
|
|
$(INSTALL) -s -m 755 bin/$(BIN) $(GLEW_TARGET)/bin
|
2002-12-13 08:31:58 +00:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
$(RM) $(GLEW_TARGET)/include/GL/glew.h $(GLEW_TARGET)/include/GL/glxew.h
|
2002-12-15 08:30:27 +00:00
|
|
|
$(RM) $(GLEW_TARGET)/lib/$(LIB.LNK) $(GLEW_TARGET)/lib/$(LIB)
|
|
|
|
$(RM) $(GLEW_TARGET)/bin/$(BIN)
|
2002-12-13 08:31:58 +00:00
|
|
|
|
|
|
|
clean:
|
2002-12-15 08:30:27 +00:00
|
|
|
$(RM) $(LIB.OBJS) lib/$(LIB) lib/$(LIB.LNK) $(BIN.OBJS) bin/$(BIN)
|