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