blob: c57038d1344525106c8e2dd4b858c3736170ed21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# This file is part of mingw-cross-env.
# See doc/index.html for further information.
# GLEW
PKG := glew
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.5.2
$(PKG)_CHECKSUM := 21fa100ff77d10f6767ef387f65de98eaaaa683f
$(PKG)_SUBDIR := glew-$($(PKG)_VERSION)
$(PKG)_FILE := glew-$($(PKG)_VERSION).tgz
$(PKG)_WEBSITE := http://glew.sourceforge.net/
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glew/glew/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
$(call SOURCEFORGE_FILES,http://sourceforge.net/projects/glew/files/glew/) | \
$(SED) -n 's,.*glew-\([0-9][^>]*\)\.tgz.*,\1,p' | \
tail -1
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/'
endef
|