mxe/src/glew.mk

50 lines
2.2 KiB
Makefile
Raw Normal View History

# Copyright (C) 2009 Volker Grabsch
# Martin Lambers
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject
# to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2009-02-14 20:39:02 +00:00
# GLEW
PKG := glew
$(PKG)_VERSION := 1.5.1
$(PKG)_CHECKSUM := a94113169d46487ccda1bb2fde68fa1803bdf009
$(PKG)_SUBDIR := glew
$(PKG)_FILE := glew-$($(PKG)_VERSION)-src.tgz
$(PKG)_WEBSITE := http://glew.sourceforge.net/
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glew/glew/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
2009-02-14 20:39:02 +00:00
define $(PKG)_UPDATE
$(call SOURCEFORGE_FILES,http://sourceforge.net/projects/glew/files/glew/) | \
$(SED) -n 's,.*glew-\([0-9][^>]*\)-src\.tgz.*,\1,p' | \
tail -1
2009-02-14 20:39:02 +00:00
endef
define $(PKG)_BUILD
cd '$(1)' && $(TARGET)-gcc -O2 -DGLEW_STATIC -Iinclude -c -o glew.o src/glew.c
cd '$(1)' && $(TARGET)-ar cr libGLEW.a glew.o
$(TARGET)-ranlib '$(1)/libGLEW.a'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/'
$(INSTALL) -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/libglew32s.a'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include/GL'
$(INSTALL) -m644 '$(1)/include/GL/glew.h' '$(1)/include/GL/wglew.h' '$(PREFIX)/$(TARGET)/include/GL/'
2009-02-14 20:39:02 +00:00
endef