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
|
|
|
|
|
2014-07-13 13:41:45 +00:00
|
|
|
GLEW_PREFIX ?= /usr
|
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
|
2016-02-05 20:46:18 +00:00
|
|
|
PKGDIR ?= $(GLEW_DEST)/lib/pkgconfig
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2014-07-13 13:41:45 +00:00
|
|
|
ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU)
|
|
|
|
LIBGLU = glu
|
|
|
|
endif
|
|
|
|
|
2016-05-07 14:12:11 +00:00
|
|
|
DIST_NAME ?= glew-$(GLEW_VERSION)
|
2013-07-21 03:11:31 +00:00
|
|
|
DIST_SRC_ZIP ?= $(shell pwd)/$(DIST_NAME).zip
|
|
|
|
DIST_SRC_TGZ ?= $(shell pwd)/$(DIST_NAME).tgz
|
|
|
|
DIST_WIN32 ?= $(shell pwd)/$(DIST_NAME)-win32.zip
|
2004-11-14 02:34:30 +00:00
|
|
|
|
2013-07-21 03:11:31 +00:00
|
|
|
DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
|
2009-12-31 16:05:28 +00:00
|
|
|
|
2016-05-07 14:12:11 +00:00
|
|
|
# To disable stripping of linked binaries either:
|
2012-02-12 20:12:36 +00:00
|
|
|
# - use STRIP= on gmake command-line
|
|
|
|
# - edit this makefile to set STRIP to the empty string
|
2016-05-07 14:12:11 +00:00
|
|
|
# (Note: STRIP does not affect the strip in the install step)
|
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
|
|
|
|
2015-10-10 01:18:35 +00:00
|
|
|
AR ?= ar
|
|
|
|
ARFLAGS ?= cr
|
|
|
|
INSTALL ?= install
|
|
|
|
STRIP ?= strip
|
|
|
|
RM ?= rm -f
|
|
|
|
LN ?= ln -sf
|
|
|
|
UNIX2DOS ?= unix2dos -q
|
|
|
|
DOS2UNIX ?= dos2unix -q
|
2012-02-12 20:12:36 +00:00
|
|
|
|
2014-07-13 13:44:54 +00:00
|
|
|
ifneq (,$(filter debug,$(MAKECMDGOALS)))
|
2003-04-04 18:13:58 +00:00
|
|
|
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
|
|
|
|
2015-11-19 11:12:48 +00:00
|
|
|
all debug: glew.lib glew.bin
|
2011-02-19 05:02:26 +00:00
|
|
|
|
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)
|
2019-09-27 13:31:32 +00:00
|
|
|
LIB.SHARED.DIR ?= lib
|
2012-02-12 20:12:36 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2016-09-07 14:20:59 +00:00
|
|
|
glew.lib: glew.lib.shared glew.lib.static
|
|
|
|
|
2019-09-27 13:31:32 +00:00
|
|
|
glew.lib.shared: lib $(LIB.SHARED.DIR) $(LIB.SHARED.DIR)/$(LIB.SHARED) glew.pc
|
2016-09-07 14:20:59 +00:00
|
|
|
glew.lib.static: lib lib/$(LIB.STATIC) glew.pc
|
2003-04-04 18:13:58 +00:00
|
|
|
|
2016-10-15 04:56:30 +00:00
|
|
|
.PHONY: glew.lib glew.lib.shared glew.lib.static
|
|
|
|
|
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)
|
2015-03-26 09:35:52 +00:00
|
|
|
ifneq ($(AR),)
|
2015-03-26 02:24:03 +00:00
|
|
|
$(AR) $(ARFLAGS) $@ $^
|
2015-03-26 09:35:52 +00:00
|
|
|
else ifneq ($(LIBTOOL),)
|
|
|
|
$(LIBTOOL) $@ $^
|
|
|
|
endif
|
2012-02-12 20:12:36 +00:00
|
|
|
ifneq ($(STRIP),)
|
|
|
|
$(STRIP) -x $@
|
|
|
|
endif
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2019-09-27 13:31:32 +00:00
|
|
|
$(LIB.SHARED.DIR)/$(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),)
|
2019-09-27 13:31:32 +00:00
|
|
|
$(LN) $(LIB.SHARED) $(LIB.SHARED.DIR)/$(LIB.SONAME)
|
|
|
|
$(LN) $(LIB.SHARED) $(LIB.SHARED.DIR)/$(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 $@)
|
2014-09-27 03:05:04 +00:00
|
|
|
$(CC) -DGLEW_NO_GLU -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2012-11-11 19:09:20 +00:00
|
|
|
# Force re-write of glew.pc, GLEW_DEST can vary
|
|
|
|
|
|
|
|
.PHONY: glew.pc
|
|
|
|
|
2011-02-19 05:02:26 +00:00
|
|
|
glew.pc: glew.pc.in
|
|
|
|
sed \
|
2014-07-13 13:41:45 +00:00
|
|
|
-e "s|@prefix@|$(GLEW_PREFIX)|g" \
|
2011-02-19 05:02:26 +00:00
|
|
|
-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" \
|
2014-07-13 13:41:45 +00:00
|
|
|
-e "s|@libname@|$(NAME)|g" \
|
2019-02-02 13:36:35 +00:00
|
|
|
-e "s|@libgl@|$(LDFLAGS.GL)|g" \
|
2014-07-13 13:41:45 +00:00
|
|
|
-e "s|@requireslib@|$(LIBGLU)|g" \
|
2011-02-19 05:02:26 +00:00
|
|
|
< $< > $@
|
2002-12-13 08:31:58 +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)
|
|
|
|
|
2012-08-16 19:26:32 +00:00
|
|
|
# Don't build glewinfo or visualinfo for NaCL, yet.
|
|
|
|
|
|
|
|
ifneq ($(filter nacl%,$(SYSTEM)),)
|
|
|
|
glew.bin: glew.lib bin
|
|
|
|
else
|
2012-02-12 20:12:36 +00:00
|
|
|
glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
|
2012-08-16 19:26:32 +00:00
|
|
|
endif
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
bin:
|
|
|
|
mkdir bin
|
|
|
|
|
2019-09-27 13:31:32 +00:00
|
|
|
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
|
2012-02-12 20:12:36 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
|
|
|
|
ifneq ($(STRIP),)
|
|
|
|
$(STRIP) -x $@
|
|
|
|
endif
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2019-09-27 13:31:32 +00:00
|
|
|
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
|
2012-02-12 20:12:36 +00:00
|
|
|
$(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
|
|
|
|
|
2015-11-19 11:12:48 +00:00
|
|
|
install.all: install install.bin
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
install: install.include install.lib install.pkgconfig
|
|
|
|
|
|
|
|
install.lib: glew.lib
|
2013-07-23 23:41:27 +00:00
|
|
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)"
|
2003-07-06 15:01:13 +00:00
|
|
|
# runtime
|
2010-10-29 05:14:45 +00:00
|
|
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
2013-07-23 23:41:27 +00:00
|
|
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
|
2019-09-27 13:31:32 +00:00
|
|
|
$(INSTALL) -m 0755 $(LIB.SHARED.DIR)/$(LIB.SHARED) "$(DESTDIR)$(BINDIR)/"
|
2004-01-11 11:45:55 +00:00
|
|
|
else
|
2019-09-27 13:31:32 +00:00
|
|
|
$(INSTALL) -m 0644 $(LIB.SHARED.DIR)/$(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/"
|
2012-02-15 19:15:40 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(LN),)
|
2013-07-23 23:41:27 +00:00
|
|
|
$(LN) $(LIB.SHARED) "$(DESTDIR)$(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)),)
|
2013-07-23 23:41:27 +00:00
|
|
|
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) "$(DESTDIR)$(LIBDIR)/"
|
2012-02-15 19:15:40 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(LN),)
|
2013-07-23 23:41:27 +00:00
|
|
|
$(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)"
|
2004-01-11 11:45:55 +00:00
|
|
|
endif
|
2013-07-23 23:41:27 +00:00
|
|
|
$(INSTALL) -m 0644 lib/$(LIB.STATIC) "$(DESTDIR)$(LIBDIR)/"
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
install.bin: glew.bin
|
2013-07-23 23:41:27 +00:00
|
|
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
|
|
|
|
$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
|
2002-12-13 08:31:58 +00:00
|
|
|
|
2011-02-19 05:02:26 +00:00
|
|
|
install.include:
|
2013-07-23 23:41:27 +00:00
|
|
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
|
|
|
|
$(INSTALL) -m 0644 include/GL/wglew.h "$(DESTDIR)$(INCDIR)/"
|
|
|
|
$(INSTALL) -m 0644 include/GL/glew.h "$(DESTDIR)$(INCDIR)/"
|
|
|
|
$(INSTALL) -m 0644 include/GL/glxew.h "$(DESTDIR)$(INCDIR)/"
|
2021-01-10 01:13:03 +00:00
|
|
|
$(INSTALL) -m 0644 include/GL/eglew.h "$(DESTDIR)$(INCDIR)/"
|
2011-02-19 05:02:26 +00:00
|
|
|
|
|
|
|
install.pkgconfig: glew.pc
|
2016-02-05 20:46:18 +00:00
|
|
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(PKGDIR)"
|
|
|
|
$(INSTALL) -d -m 0755 "$(DESTDIR)$(PKGDIR)"
|
|
|
|
$(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(PKGDIR)/"
|
2011-02-19 05:02:26 +00:00
|
|
|
|
2002-12-13 08:31:58 +00:00
|
|
|
uninstall:
|
2013-07-23 23:41:27 +00:00
|
|
|
$(RM) "$(DESTDIR)$(INCDIR)/wglew.h"
|
|
|
|
$(RM) "$(DESTDIR)$(INCDIR)/glew.h"
|
|
|
|
$(RM) "$(DESTDIR)$(INCDIR)/glxew.h"
|
2015-11-19 11:12:48 +00:00
|
|
|
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)"
|
2010-10-29 05:14:45 +00:00
|
|
|
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
2015-11-19 11:12:48 +00:00
|
|
|
$(RM) "$(DESTDIR)$(BINDIR)/$(LIB.SHARED)"
|
2004-01-11 11:45:55 +00:00
|
|
|
else
|
2015-11-19 11:12:48 +00:00
|
|
|
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)"
|
|
|
|
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SHARED)"
|
2004-01-11 11:45:55 +00:00
|
|
|
endif
|
2015-11-19 11:12:48 +00:00
|
|
|
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.STATIC)"
|
2013-07-23 23:41:27 +00:00
|
|
|
$(RM) "$(DESTDIR)$(BINDIR)/$(GLEWINFO.BIN)" "$(DESTDIR)$(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/
|
2015-11-19 11:12:48 +00:00
|
|
|
$(RM) glew.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:
|
2013-07-21 03:11:31 +00:00
|
|
|
$(RM) -r $(DIST_DIR)
|
|
|
|
mkdir -p $(DIST_DIR)
|
|
|
|
cp -a include $(DIST_DIR)
|
|
|
|
cp -a doc $(DIST_DIR)
|
|
|
|
cp -a *.txt $(DIST_DIR)
|
|
|
|
cp -a bin $(DIST_DIR)
|
|
|
|
cp -a lib $(DIST_DIR)
|
|
|
|
$(RM) -f $(DIST_DIR)/bin/*/*/*.pdb $(DIST_DIR)/bin/*/*/*.exp
|
|
|
|
$(RM) -f $(DIST_DIR)/bin/*/*/glewinfo-*.exe $(DIST_DIR)/bin/*/*/visualinfo-*.exe
|
|
|
|
$(RM) -f $(DIST_DIR)/lib/*/*/*.pdb $(DIST_DIR)/lib/*/*/*.exp
|
2015-10-10 01:18:35 +00:00
|
|
|
$(UNIX2DOS) $(DIST_DIR)/include/GL/*.h
|
|
|
|
$(UNIX2DOS) $(DIST_DIR)/doc/*.txt
|
|
|
|
$(UNIX2DOS) $(DIST_DIR)/doc/*.html
|
|
|
|
$(UNIX2DOS) $(DIST_DIR)/*.txt
|
2013-07-21 03:11:31 +00:00
|
|
|
rm -f $(DIST_WIN32)
|
2015-10-10 01:18:35 +00:00
|
|
|
cd $(DIST_DIR)/.. && zip -rq9 $(DIST_WIN32) $(DIST_NAME)
|
2013-07-21 03:11:31 +00:00
|
|
|
$(RM) -r $(DIST_DIR)
|
2009-12-31 16:05:28 +00:00
|
|
|
|
2009-12-31 17:05:56 +00:00
|
|
|
dist-src:
|
2013-07-21 03:11:31 +00:00
|
|
|
$(RM) -r $(DIST_DIR)
|
|
|
|
mkdir -p $(DIST_DIR)
|
|
|
|
mkdir -p $(DIST_DIR)/bin
|
|
|
|
mkdir -p $(DIST_DIR)/lib
|
|
|
|
cp -a auto $(DIST_DIR)
|
|
|
|
$(RM) -Rf $(DIST_DIR)/auto/registry
|
2018-10-10 04:09:18 +00:00
|
|
|
$(RM) -Rf $(DIST_DIR)/auto/glfixes
|
|
|
|
$(RM) -Rf $(DIST_DIR)/auto/OpenGL-Registry
|
|
|
|
$(RM) -Rf $(DIST_DIR)/auto/EGL-Registry
|
2013-07-21 03:11:31 +00:00
|
|
|
cp -a build $(DIST_DIR)
|
|
|
|
cp -a config $(DIST_DIR)
|
|
|
|
cp -a src $(DIST_DIR)
|
|
|
|
cp -a doc $(DIST_DIR)
|
|
|
|
cp -a include $(DIST_DIR)
|
2016-07-08 10:40:34 +00:00
|
|
|
cp -a *.md $(DIST_DIR)
|
2013-07-21 03:11:31 +00:00
|
|
|
cp -a *.txt $(DIST_DIR)
|
|
|
|
cp -a Makefile $(DIST_DIR)
|
|
|
|
cp -a glew.pc.in $(DIST_DIR)
|
|
|
|
find $(DIST_DIR) -name '*.o' | xargs $(RM) -r
|
|
|
|
find $(DIST_DIR) -name '*~' | xargs $(RM) -r
|
|
|
|
find $(DIST_DIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
|
|
|
|
find $(DIST_DIR) -name .svn | xargs $(RM) -r
|
|
|
|
find $(DIST_DIR) -name "*.patch" | xargs $(RM) -r
|
2015-10-10 01:18:35 +00:00
|
|
|
$(DOS2UNIX) $(DIST_DIR)/Makefile
|
|
|
|
$(DOS2UNIX) $(DIST_DIR)/auto/Makefile
|
|
|
|
$(DOS2UNIX) $(DIST_DIR)/config/*
|
|
|
|
$(UNIX2DOS) $(DIST_DIR)/auto/core/*
|
|
|
|
$(UNIX2DOS) $(DIST_DIR)/auto/extensions/*
|
|
|
|
find $(DIST_DIR) -name '*.h' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.c' | xargs $(UNIX2DOS)
|
2016-07-08 10:40:34 +00:00
|
|
|
find $(DIST_DIR) -name '*.md' | xargs $(UNIX2DOS)
|
2015-10-10 01:18:35 +00:00
|
|
|
find $(DIST_DIR) -name '*.txt' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.html' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.css' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.sh' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.pl' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name 'Makefile' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.in' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.pm' | xargs $(UNIX2DOS)
|
|
|
|
find $(DIST_DIR) -name '*.rc' | xargs $(UNIX2DOS)
|
2013-07-21 03:11:31 +00:00
|
|
|
rm -f $(DIST_SRC_ZIP)
|
2015-10-10 01:18:35 +00:00
|
|
|
cd $(DIST_DIR)/.. && zip -rq9 $(DIST_SRC_ZIP) $(DIST_NAME)
|
|
|
|
$(DOS2UNIX) $(DIST_DIR)/Makefile
|
|
|
|
$(DOS2UNIX) $(DIST_DIR)/auto/Makefile
|
|
|
|
$(DOS2UNIX) $(DIST_DIR)/config/*
|
|
|
|
$(DOS2UNIX) $(DIST_DIR)/auto/core/*
|
|
|
|
$(DOS2UNIX) $(DIST_DIR)/auto/extensions/*
|
|
|
|
find $(DIST_DIR) -name '*.h' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.c' | xargs $(DOS2UNIX)
|
2016-07-08 10:40:34 +00:00
|
|
|
find $(DIST_DIR) -name '*.md' | xargs $(DOS2UNIX)
|
2015-10-10 01:18:35 +00:00
|
|
|
find $(DIST_DIR) -name '*.txt' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.html' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.css' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.sh' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.pl' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name 'Makefile' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.in' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.pm' | xargs $(DOS2UNIX)
|
|
|
|
find $(DIST_DIR) -name '*.rc' | xargs $(DOS2UNIX)
|
2013-07-21 03:11:31 +00:00
|
|
|
rm -f $(DIST_SRC_TGZ)
|
2015-10-10 01:18:35 +00:00
|
|
|
cd $(DIST_DIR)/.. && env GZIP=-9 tar czf $(DIST_SRC_TGZ) $(DIST_NAME)
|
2013-07-21 03:11:31 +00:00
|
|
|
$(RM) -r $(DIST_DIR)
|
2009-12-31 17:05:56 +00:00
|
|
|
|
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
|