2003-10-27 05:28:55 +00:00
|
|
|
#!gmake
|
2002-12-13 08:31:58 +00:00
|
|
|
## The OpenGL Extension Wrangler Library
|
2007-12-28 01:47:25 +00:00
|
|
|
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
|
|
|
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
2004-02-01 20:03:26 +00:00
|
|
|
## Copyright (C) 2002, Lev Povalahev
|
2003-05-01 18:42:38 +00:00
|
|
|
## All rights reserved.
|
|
|
|
##
|
|
|
|
## Redistribution and use in source and binary forms, with or without
|
|
|
|
## modification, are permitted provided that the following conditions are met:
|
|
|
|
##
|
|
|
|
## * Redistributions of source code must retain the above copyright notice,
|
|
|
|
## this list of conditions and the following disclaimer.
|
|
|
|
## * Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
## this list of conditions and the following disclaimer in the documentation
|
|
|
|
## and/or other materials provided with the distribution.
|
|
|
|
## * The name of the author may be used to endorse or promote products
|
|
|
|
## derived from this software without specific prior written permission.
|
2002-12-13 08:31:58 +00:00
|
|
|
##
|
2003-05-01 18:42:38 +00:00
|
|
|
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
|
|
## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
## THE POSSIBILITY OF SUCH DAMAGE.
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2005-01-05 20:19:03 +00:00
|
|
|
include config/version
|
2003-07-06 15:01:13 +00:00
|
|
|
|
|
|
|
SHELL = /bin/sh
|
2010-09-22 19:38:25 +00:00
|
|
|
SYSTEM ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
|
2004-12-07 17:28:58 +00:00
|
|
|
SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2004-12-07 17:28:58 +00:00
|
|
|
ifeq ($(SYSTEM.SUPPORTED), 1)
|
|
|
|
include config/Makefile.$(SYSTEM)
|
2003-04-04 18:13:58 +00:00
|
|
|
else
|
|
|
|
$(error "Platform '$(SYSTEM)' not supported")
|
|
|
|
endif
|
|
|
|
|
2007-03-02 15:14:23 +00:00
|
|
|
GLEW_DEST ?= /usr
|
2012-02-12 20:12:36 +00:00
|
|
|
BINDIR ?= $(GLEW_DEST)/bin
|
|
|
|
LIBDIR ?= $(GLEW_DEST)/lib
|
|
|
|
INCDIR ?= $(GLEW_DEST)/include/GL
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2007-03-02 15:14:23 +00:00
|
|
|
TARDIR = ../glew-$(GLEW_VERSION)
|
2009-12-31 17:05:56 +00:00
|
|
|
TARBALL = ../glew-$(GLEW_VERSION).tar.gz
|
2004-11-14 02:34:30 +00:00
|
|
|
|
2009-12-31 17:05:56 +00:00
|
|
|
DIST_DIR = glew-$(GLEW_VERSION)
|
|
|
|
DIST_WIN32 = glew-$(GLEW_VERSION)-win32.zip
|
|
|
|
DIST_SRC_ZIP = glew-$(GLEW_VERSION).zip
|
|
|
|
DIST_SRC_TGZ = glew-$(GLEW_VERSION).tgz
|
2009-12-31 16:05:28 +00:00
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
# To disable stripping of binaries either:
|
|
|
|
# - use STRIP= on gmake command-line
|
|
|
|
# - edit this makefile to set STRIP to the empty string
|
2012-02-15 19:15:40 +00:00
|
|
|
#
|
|
|
|
# To disable symlinks:
|
|
|
|
# - use LN= on gmake command-line
|
2012-02-12 20:12:36 +00:00
|
|
|
|
|
|
|
AR ?= ar
|
|
|
|
INSTALL ?= install
|
|
|
|
STRIP ?= strip
|
|
|
|
RM ?= rm -f
|
|
|
|
LN ?= ln -sf
|
|
|
|
|
2003-04-04 18:13:58 +00:00
|
|
|
ifeq ($(MAKECMDGOALS), debug)
|
|
|
|
OPT = -g
|
|
|
|
else
|
2003-10-27 05:28:55 +00:00
|
|
|
OPT = $(POPT)
|
2003-04-04 18:13:58 +00:00
|
|
|
endif
|
2002-12-13 08:31:58 +00:00
|
|
|
INCLUDE = -Iinclude
|
2003-09-25 23:30:52 +00:00
|
|
|
CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2011-02-19 05:02:26 +00:00
|
|
|
all debug: glew.lib glew.lib.mx glew.bin
|
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
# GLEW shared and static libraries
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
LIB.LDFLAGS := $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
|
|
|
|
LIB.LIBS := $(GL_LDFLAGS)
|
|
|
|
|
|
|
|
LIB.SRCS := src/glew.c
|
|
|
|
LIB.SRCS.NAMES := $(notdir $(LIB.SRCS))
|
|
|
|
|
|
|
|
LIB.OBJS := $(addprefix tmp/$(SYSTEM)/default/static/,$(LIB.SRCS.NAMES))
|
|
|
|
LIB.OBJS := $(LIB.OBJS:.c=.o)
|
|
|
|
LIB.SOBJS := $(addprefix tmp/$(SYSTEM)/default/shared/,$(LIB.SRCS.NAMES))
|
|
|
|
LIB.SOBJS := $(LIB.SOBJS:.c=.o)
|
|
|
|
|
|
|
|
LIB.OBJS.MX := $(addprefix tmp/$(SYSTEM)/mx/static/,$(LIB.SRCS.NAMES))
|
|
|
|
LIB.OBJS.MX := $(LIB.OBJS.MX:.c=.o)
|
|
|
|
LIB.SOBJS.MX := $(addprefix tmp/$(SYSTEM)/mx/shared/,$(LIB.SRCS.NAMES))
|
|
|
|
LIB.SOBJS.MX := $(LIB.SOBJS.MX:.c=.o)
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
glew.lib: lib lib/$(LIB.SHARED) lib/$(LIB.STATIC) glew.pc
|
2003-04-04 18:13:58 +00:00
|
|
|
|
2003-08-11 19:03:03 +00:00
|
|
|
lib:
|
|
|
|
mkdir lib
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2003-08-11 19:03:03 +00:00
|
|
|
lib/$(LIB.STATIC): $(LIB.OBJS)
|
2003-04-04 18:13:58 +00:00
|
|
|
$(AR) cr $@ $^
|
2012-02-12 20:12:36 +00:00
|
|
|
ifneq ($(STRIP),)
|
|
|
|
$(STRIP) -x $@
|
|
|
|
endif
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2004-11-14 02:34:30 +00:00
|
|
|
lib/$(LIB.SHARED): $(LIB.SOBJS)
|
2003-09-26 12:24:46 +00:00
|
|
|
$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
2012-02-15 19:15:40 +00:00
|
|
|
ifneq ($(LN),)
|
2003-08-11 19:03:03 +00:00
|
|
|
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
|
|
|
|
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
|
2004-01-11 11:45:55 +00:00
|
|
|
endif
|
2012-02-12 20:12:36 +00:00
|
|
|
ifneq ($(STRIP),)
|
|
|
|
$(STRIP) -x $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
|
|
|
@mkdir -p $(dir $@)
|
2012-05-05 04:35:12 +00:00
|
|
|
$(CC) -DGLEW_NO_GLU -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
2012-02-12 20:12:36 +00:00
|
|
|
|
|
|
|
tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
|
|
|
@mkdir -p $(dir $@)
|
2012-08-08 02:54:20 +00:00
|
|
|
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2011-02-19 05:02:26 +00:00
|
|
|
glew.pc: glew.pc.in
|
|
|
|
sed \
|
|
|
|
-e "s|@prefix@|$(GLEW_DEST)|g" \
|
|
|
|
-e "s|@libdir@|$(LIBDIR)|g" \
|
|
|
|
-e "s|@exec_prefix@|$(BINDIR)|g" \
|
|
|
|
-e "s|@includedir@|$(INCDIR)|g" \
|
|
|
|
-e "s|@version@|$(GLEW_VERSION)|g" \
|
|
|
|
-e "s|@cflags@||g" \
|
|
|
|
-e "s|@libname@|GLEW|g" \
|
|
|
|
< $< > $@
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
# GLEW MX static and shared libraries
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
glew.lib.mx: lib lib/$(LIB.SHARED.MX) lib/$(LIB.STATIC.MX) glewmx.pc
|
|
|
|
|
|
|
|
lib/$(LIB.STATIC.MX): $(LIB.OBJS.MX)
|
|
|
|
$(AR) cr $@ $^
|
|
|
|
|
|
|
|
lib/$(LIB.SHARED.MX): $(LIB.SOBJS.MX)
|
2011-03-29 01:21:13 +00:00
|
|
|
$(LD) $(LDFLAGS.SO.MX) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
2012-02-15 19:15:40 +00:00
|
|
|
ifneq ($(LN),)
|
2011-02-19 05:02:26 +00:00
|
|
|
$(LN) $(LIB.SHARED.MX) lib/$(LIB.SONAME.MX)
|
|
|
|
$(LN) $(LIB.SHARED.MX) lib/$(LIB.DEVLNK.MX)
|
|
|
|
endif
|
2012-02-12 20:12:36 +00:00
|
|
|
ifneq ($(STRIP),)
|
|
|
|
$(STRIP) -x $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
tmp/$(SYSTEM)/mx/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
|
|
|
@mkdir -p $(dir $@)
|
2012-05-05 04:35:12 +00:00
|
|
|
$(CC) -DGLEW_NO_GLU -DGLEW_MX -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
2012-02-12 20:12:36 +00:00
|
|
|
|
|
|
|
tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
|
|
|
@mkdir -p $(dir $@)
|
2012-08-08 02:54:20 +00:00
|
|
|
$(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
glewmx.pc: glew.pc.in
|
2010-01-07 17:03:40 +00:00
|
|
|
sed \
|
|
|
|
-e "s|@prefix@|$(GLEW_DEST)|g" \
|
|
|
|
-e "s|@libdir@|$(LIBDIR)|g" \
|
|
|
|
-e "s|@exec_prefix@|$(BINDIR)|g" \
|
|
|
|
-e "s|@includedir@|$(INCDIR)|g" \
|
|
|
|
-e "s|@version@|$(GLEW_VERSION)|g" \
|
2011-02-19 05:02:26 +00:00
|
|
|
-e "s|@cflags@|-DGLEW_MX|g" \
|
|
|
|
-e "s|@libname@|GLEWmx|g" \
|
2010-01-07 17:03:40 +00:00
|
|
|
< $< > $@
|
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
# GLEW utility programs
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
GLEWINFO.BIN := glewinfo$(BIN.SUFFIX)
|
|
|
|
GLEWINFO.BIN.SRC := src/glewinfo.c
|
|
|
|
GLEWINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(GLEWINFO.BIN.SRC)))
|
|
|
|
GLEWINFO.BIN.OBJ := $(GLEWINFO.BIN.OBJ:.c=.o)
|
|
|
|
|
|
|
|
VISUALINFO.BIN := visualinfo$(BIN.SUFFIX)
|
|
|
|
VISUALINFO.BIN.SRC := src/visualinfo.c
|
|
|
|
VISUALINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(VISUALINFO.BIN.SRC)))
|
|
|
|
VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
|
|
|
|
|
|
|
|
glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
bin:
|
|
|
|
mkdir bin
|
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) lib/$(LIB.SHARED)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
|
|
|
|
ifneq ($(STRIP),)
|
|
|
|
$(STRIP) -x $@
|
|
|
|
endif
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJ) lib/$(LIB.SHARED)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.OBJ) $(BIN.LIBS)
|
|
|
|
ifneq ($(STRIP),)
|
|
|
|
$(STRIP) -x $@
|
|
|
|
endif
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2012-02-12 20:12:36 +00:00
|
|
|
$(GLEWINFO.BIN.OBJ): $(GLEWINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
|
|
|
|
|
|
|
$(VISUALINFO.BIN.OBJ): $(VISUALINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
# Install targets
|
|
|
|
|
|
|
|
install.all: install install.mx install.bin
|
|
|
|
|
|
|
|
install: install.include install.lib install.pkgconfig
|
|
|
|
|
|
|
|
install.mx: install.include install.lib.mx install.pkgconfig.mx
|
|
|
|
|
|
|
|
install.lib: glew.lib
|
2006-03-02 23:02:51 +00:00
|
|
|
$(INSTALL) -d -m 0755 $(LIBDIR)
|
2003-07-06 15:01:13 +00:00
|
|
|
# runtime
|
2010-10-29 05:14:45 +00:00
|
|
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
2011-04-26 02:15:35 +00:00
|
|
|
$(INSTALL) -d -m 0755 $(BINDIR)
|
2012-07-18 03:46:09 +00:00
|
|
|
$(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/
|
2004-01-11 11:45:55 +00:00
|
|
|
else
|
2006-03-02 23:02:51 +00:00
|
|
|
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
|
2012-02-15 19:15:40 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(LN),)
|
2006-03-02 23:02:51 +00:00
|
|
|
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
|
2004-01-11 11:45:55 +00:00
|
|
|
endif
|
2012-02-15 19:15:40 +00:00
|
|
|
|
2003-07-06 15:01:13 +00:00
|
|
|
# development files
|
2010-10-29 05:14:45 +00:00
|
|
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
2006-03-02 23:02:51 +00:00
|
|
|
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
|
2012-02-15 19:15:40 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(LN),)
|
2006-03-02 23:02:51 +00:00
|
|
|
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
|
2004-01-11 11:45:55 +00:00
|
|
|
endif
|
2011-04-26 02:15:35 +00:00
|
|
|
$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
install.lib.mx: glew.lib.mx
|
|
|
|
$(INSTALL) -d -m 0755 $(LIBDIR)
|
|
|
|
# runtime
|
|
|
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
2011-04-26 02:15:35 +00:00
|
|
|
$(INSTALL) -d -m 0755 $(BINDIR)
|
|
|
|
$(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) $(BINDIR)/
|
2011-02-19 05:02:26 +00:00
|
|
|
else
|
|
|
|
$(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) $(LIBDIR)/
|
2012-02-15 19:15:40 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(LN),)
|
2011-02-19 05:02:26 +00:00
|
|
|
$(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)/
|
2012-02-15 19:15:40 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(LN),)
|
2011-02-19 05:02:26 +00:00
|
|
|
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.DEVLNK.MX)
|
|
|
|
endif
|
2011-04-26 02:15:35 +00:00
|
|
|
$(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
install.bin: glew.bin
|
|
|
|
$(INSTALL) -d -m 0755 $(BINDIR)
|
2007-03-02 16:56:00 +00:00
|
|
|
$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2011-02-19 05:02:26 +00:00
|
|
|
install.include:
|
|
|
|
$(INSTALL) -d -m 0755 $(INCDIR)
|
|
|
|
$(INSTALL) -m 0644 include/GL/wglew.h $(INCDIR)/
|
|
|
|
$(INSTALL) -m 0644 include/GL/glew.h $(INCDIR)/
|
|
|
|
$(INSTALL) -m 0644 include/GL/glxew.h $(INCDIR)/
|
|
|
|
|
|
|
|
install.pkgconfig: glew.pc
|
|
|
|
$(INSTALL) -d -m 0755 $(LIBDIR)
|
|
|
|
$(INSTALL) -d -m 0755 $(LIBDIR)/pkgconfig
|
|
|
|
$(INSTALL) -m 0644 glew.pc $(LIBDIR)/pkgconfig/
|
|
|
|
|
|
|
|
install.pkgconfig.mx: glewmx.pc
|
|
|
|
$(INSTALL) -d -m 0755 $(LIBDIR)
|
|
|
|
$(INSTALL) -d -m 0755 $(LIBDIR)/pkgconfig
|
|
|
|
$(INSTALL) -m 0644 glewmx.pc $(LIBDIR)/pkgconfig/
|
|
|
|
|
2002-12-13 08:31:58 +00:00
|
|
|
uninstall:
|
2007-03-02 16:56:00 +00:00
|
|
|
$(RM) $(INCDIR)/wglew.h
|
|
|
|
$(RM) $(INCDIR)/glew.h
|
|
|
|
$(RM) $(INCDIR)/glxew.h
|
2011-02-19 05:02:26 +00:00
|
|
|
$(RM) $(LIBDIR)/$(LIB.DEVLNK) $(LIBDIR)/$(LIB.DEVLNK.MX)
|
2010-10-29 05:14:45 +00:00
|
|
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
2011-02-19 05:02:26 +00:00
|
|
|
$(RM) $(BINDIR)/$(LIB.SHARED) $(BINDIR)/$(LIB.SHARED.MX)
|
2004-01-11 11:45:55 +00:00
|
|
|
else
|
2011-02-19 05:02:26 +00:00
|
|
|
$(RM) $(LIBDIR)/$(LIB.SONAME) $(LIBDIR)/$(LIB.SONAME.MX)
|
|
|
|
$(RM) $(LIBDIR)/$(LIB.SHARED) $(LIBDIR)/$(LIB.SHARED.MX)
|
2004-01-11 11:45:55 +00:00
|
|
|
endif
|
2011-04-26 02:15:35 +00:00
|
|
|
$(RM) $(LIBDIR)/$(LIB.STATIC) $(LIBDIR)/$(LIB.STATIC.MX)
|
2007-03-02 16:56:00 +00:00
|
|
|
$(RM) $(BINDIR)/$(GLEWINFO.BIN) $(BINDIR)/$(VISUALINFO.BIN)
|
2002-12-13 08:31:58 +00:00
|
|
|
|
|
|
|
clean:
|
2012-02-12 20:12:36 +00:00
|
|
|
$(RM) -r tmp/
|
|
|
|
$(RM) -r lib/
|
|
|
|
$(RM) -r bin/
|
2011-02-19 05:02:26 +00:00
|
|
|
$(RM) glew.pc glewmx.pc
|
2003-07-06 15:01:13 +00:00
|
|
|
|
|
|
|
distclean: clean
|
2003-10-03 06:28:55 +00:00
|
|
|
find . -name \*~ | xargs $(RM)
|
|
|
|
find . -name .\*.sw\? | xargs $(RM)
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2011-02-19 05:02:26 +00:00
|
|
|
# Distributions
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2009-12-31 16:05:28 +00:00
|
|
|
dist-win32:
|
|
|
|
$(RM) -r $(TARDIR)
|
|
|
|
mkdir -p $(TARDIR)
|
|
|
|
mkdir -p $(TARDIR)/bin
|
|
|
|
mkdir -p $(TARDIR)/lib
|
|
|
|
cp -a include $(TARDIR)
|
|
|
|
cp -a doc $(TARDIR)
|
|
|
|
cp -a *.txt $(TARDIR)
|
|
|
|
cp -a lib/glew32.lib $(TARDIR)/lib
|
|
|
|
cp -a lib/glew32s.lib $(TARDIR)/lib
|
2011-04-28 23:51:46 +00:00
|
|
|
cp -a lib/glew32mx.lib $(TARDIR)/lib
|
|
|
|
cp -a lib/glew32mxs.lib $(TARDIR)/lib
|
2009-12-31 16:05:28 +00:00
|
|
|
cp -a bin/glew32.dll $(TARDIR)/bin
|
2011-04-28 23:51:46 +00:00
|
|
|
cp -a bin/glew32mx.dll $(TARDIR)/bin
|
2009-12-31 16:05:28 +00:00
|
|
|
cp -a bin/glewinfo.exe $(TARDIR)/bin
|
|
|
|
cp -a bin/visualinfo.exe $(TARDIR)/bin
|
|
|
|
find $(TARDIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
|
|
|
|
find $(TARDIR) -name .svn | xargs $(RM) -r
|
2011-01-31 14:10:28 +00:00
|
|
|
find $(TARDIR) -name "*.patch" | xargs $(RM) -r
|
2009-12-31 16:05:28 +00:00
|
|
|
unix2dos $(TARDIR)/include/GL/*.h
|
|
|
|
unix2dos $(TARDIR)/doc/*.txt
|
|
|
|
unix2dos $(TARDIR)/doc/*.html
|
|
|
|
unix2dos $(TARDIR)/*.txt
|
2009-12-31 17:05:56 +00:00
|
|
|
rm -f ../$(DIST_WIN32)
|
2009-12-31 16:05:28 +00:00
|
|
|
cd .. && zip -rv9 $(DIST_WIN32) $(DIST_DIR)
|
|
|
|
|
2009-12-31 17:05:56 +00:00
|
|
|
dist-src:
|
|
|
|
$(RM) -r $(TARDIR)
|
|
|
|
mkdir -p $(TARDIR)
|
2010-02-28 18:40:09 +00:00
|
|
|
mkdir -p $(TARDIR)/bin
|
|
|
|
mkdir -p $(TARDIR)/lib
|
2009-12-31 17:05:56 +00:00
|
|
|
cp -a auto $(TARDIR)
|
|
|
|
$(RM) -Rf $(TARDIR)/auto/registry
|
|
|
|
cp -a build $(TARDIR)
|
|
|
|
cp -a config $(TARDIR)
|
|
|
|
cp -a src $(TARDIR)
|
|
|
|
cp -a doc $(TARDIR)
|
|
|
|
cp -a include $(TARDIR)
|
|
|
|
cp -a *.txt $(TARDIR)
|
|
|
|
cp -a Makefile $(TARDIR)
|
2010-01-07 17:03:40 +00:00
|
|
|
cp -a glew.pc.in $(TARDIR)
|
2009-12-31 17:05:56 +00:00
|
|
|
find $(TARDIR) -name '*.o' | xargs $(RM) -r
|
|
|
|
find $(TARDIR) -name '*~' | xargs $(RM) -r
|
|
|
|
find $(TARDIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
|
|
|
|
find $(TARDIR) -name .svn | xargs $(RM) -r
|
2011-01-31 14:10:28 +00:00
|
|
|
find $(TARDIR) -name "*.patch" | xargs $(RM) -r
|
2011-11-23 21:45:21 +00:00
|
|
|
unix2dos $(TARDIR)/Makefile
|
2009-12-31 17:05:56 +00:00
|
|
|
unix2dos $(TARDIR)/config/*
|
|
|
|
unix2dos $(TARDIR)/auto/core/*
|
|
|
|
unix2dos $(TARDIR)/auto/extensions/*
|
|
|
|
find $(TARDIR) -name '*.h' | xargs unix2dos
|
|
|
|
find $(TARDIR) -name '*.c' | xargs unix2dos
|
|
|
|
find $(TARDIR) -name '*.txt' | xargs unix2dos
|
|
|
|
find $(TARDIR) -name '*.html' | xargs unix2dos
|
2010-03-01 05:09:30 +00:00
|
|
|
find $(TARDIR) -name '*.css' | xargs unix2dos
|
2009-12-31 17:05:56 +00:00
|
|
|
find $(TARDIR) -name '*.sh' | xargs unix2dos
|
|
|
|
find $(TARDIR) -name '*.pl' | xargs unix2dos
|
|
|
|
find $(TARDIR) -name 'Makefile' | xargs unix2dos
|
2010-01-07 17:03:40 +00:00
|
|
|
find $(TARDIR) -name '*.in' | xargs unix2dos
|
2010-02-28 18:40:09 +00:00
|
|
|
find $(TARDIR) -name '*.pm' | xargs unix2dos
|
|
|
|
find $(TARDIR) -name '*.rc' | xargs unix2dos
|
2009-12-31 17:05:56 +00:00
|
|
|
rm -f ../$(DIST_SRC_ZIP)
|
|
|
|
cd .. && zip -rv9 $(DIST_SRC_ZIP) $(DIST_DIR)
|
2011-11-23 21:45:21 +00:00
|
|
|
dos2unix $(TARDIR)/Makefile
|
2009-12-31 17:05:56 +00:00
|
|
|
dos2unix $(TARDIR)/config/*
|
|
|
|
dos2unix $(TARDIR)/auto/core/*
|
|
|
|
dos2unix $(TARDIR)/auto/extensions/*
|
|
|
|
find $(TARDIR) -name '*.h' | xargs dos2unix
|
|
|
|
find $(TARDIR) -name '*.c' | xargs dos2unix
|
|
|
|
find $(TARDIR) -name '*.txt' | xargs dos2unix
|
|
|
|
find $(TARDIR) -name '*.html' | xargs dos2unix
|
2010-03-01 05:09:30 +00:00
|
|
|
find $(TARDIR) -name '*.css' | xargs dos2unix
|
2009-12-31 17:05:56 +00:00
|
|
|
find $(TARDIR) -name '*.sh' | xargs dos2unix
|
|
|
|
find $(TARDIR) -name '*.pl' | xargs dos2unix
|
|
|
|
find $(TARDIR) -name 'Makefile' | xargs dos2unix
|
2010-01-07 17:03:40 +00:00
|
|
|
find $(TARDIR) -name '*.in' | xargs dos2unix
|
2010-02-28 18:40:09 +00:00
|
|
|
find $(TARDIR) -name '*.pm' | xargs dos2unix
|
|
|
|
find $(TARDIR) -name '*.rc' | xargs dos2unix
|
2009-12-31 17:05:56 +00:00
|
|
|
cd .. && env GZIP=-9 tar cvzf $(DIST_SRC_TGZ) $(DIST_DIR)
|
|
|
|
|
2004-01-13 07:15:59 +00:00
|
|
|
extensions:
|
|
|
|
$(MAKE) -C auto
|
|
|
|
|
2009-12-31 17:05:56 +00:00
|
|
|
.PHONY: clean distclean tardist dist-win32 dist-src
|