Mercurial > mxe-octave
annotate src/glew.mk @ 2671:de14d840a828
update package glew
author | Mark Brand <mabrand@mabrand.nl> |
---|---|
date | Wed, 18 Jul 2012 09:09:46 +0200 |
parents | 4d0f3a9da57e |
children | 14f1e48fe31e |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2271
diff
changeset
|
1 # This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
2 # See index.html for further information. |
414
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
408
diff
changeset
|
3 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
4 PKG := glew |
448
e9afec55fd6b
improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents:
422
diff
changeset
|
5 $(PKG)_IGNORE := |
2671 | 6 $(PKG)_CHECKSUM := 641c6bb3f924ec786e1e6cf2b1b230f594e0f0e4 |
639
14310a48d979
update version of package glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
448
diff
changeset
|
7 $(PKG)_SUBDIR := glew-$($(PKG)_VERSION) |
14310a48d979
update version of package glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
448
diff
changeset
|
8 $(PKG)_FILE := glew-$($(PKG)_VERSION).tgz |
422
d2f5eb27e051
improved download URLs for all SourceForge packages to ensure that the selected SOURCEFORGE_MIRROR is really used
Volker Grabsch <vog@notjusthosting.com>
parents:
417
diff
changeset
|
9 $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glew/glew/$($(PKG)_VERSION)/$($(PKG)_FILE) |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
10 $(PKG)_DEPS := gcc |
232
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 |
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 define $(PKG)_UPDATE |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2365
diff
changeset
|
13 $(WGET) -q -O- 'http://sourceforge.net/projects/glew/files/glew/' | \ |
1033
dd28c487a6b1
improved version recognition of packages: boost freetype gcc glew libgee mingwrt openssl pcre pdcurses w32api wxwidgets
Volker Grabsch <vog@notjusthosting.com>
parents:
956
diff
changeset
|
14 $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ |
dd28c487a6b1
improved version recognition of packages: boost freetype gcc glew libgee mingwrt openssl pcre pdcurses w32api wxwidgets
Volker Grabsch <vog@notjusthosting.com>
parents:
956
diff
changeset
|
15 head -1 |
232
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 endef |
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 |
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 define $(PKG)_BUILD |
2271
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
19 # Build libGLEW |
232
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 cd '$(1)' && $(TARGET)-gcc -O2 -DGLEW_STATIC -Iinclude -c -o glew.o src/glew.c |
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 cd '$(1)' && $(TARGET)-ar cr libGLEW.a glew.o |
242
4732cfd0d858
use ranlib to build the library of package glew
Volker Grabsch <vog@notjusthosting.com>
parents:
241
diff
changeset
|
22 $(TARGET)-ranlib '$(1)/libGLEW.a' |
1535
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
23 $(SED) \ |
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
24 -e "s|@prefix@|$(PREFIX)/$(TARGET)|g" \ |
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
25 -e "s|@libdir@|$(PREFIX)/$(TARGET)/lib|g" \ |
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
26 -e "s|@exec_prefix@|$(PREFIX)/$(TARGET)/bin|g" \ |
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
27 -e "s|@includedir@|$(PREFIX)/$(TARGET)/include/GL|g" \ |
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
28 -e "s|@version@|$(glew_VERSION)|g" \ |
1839
ffb336a0e80b
bugfix for the pkg-config script of package glew
Martin Lambers <marlam@marlam.de>
parents:
1826
diff
changeset
|
29 -e "s|@cflags@|-DGLEW_STATIC|g" \ |
ffb336a0e80b
bugfix for the pkg-config script of package glew
Martin Lambers <marlam@marlam.de>
parents:
1826
diff
changeset
|
30 -e "s|-l@libname@|-lGLEW -lopengl32|g" \ |
1535
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
31 < '$(1)'/glew.pc.in > '$(1)'/glew.pc |
2271
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
32 |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
33 # Build libGLEWmx |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
34 cd '$(1)' && $(TARGET)-gcc -O2 -DGLEW_STATIC -DGLEW_MX -Iinclude -c -o glewmx.o src/glew.c |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
35 cd '$(1)' && $(TARGET)-ar cr libGLEWmx.a glewmx.o |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
36 $(TARGET)-ranlib '$(1)/libGLEWmx.a' |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
37 $(SED) \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
38 -e "s|@prefix@|$(PREFIX)/$(TARGET)|g" \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
39 -e "s|@libdir@|$(PREFIX)/$(TARGET)/lib|g" \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
40 -e "s|@exec_prefix@|$(PREFIX)/$(TARGET)/bin|g" \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
41 -e "s|@includedir@|$(PREFIX)/$(TARGET)/include/GL|g" \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
42 -e "s|@version@|$(glew_VERSION)|g" \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
43 -e "s|@cflags@|-DGLEW_STATIC -DGLEW_MX|g" \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
44 -e "s|-l@libname@|-lGLEWmx -lopengl32|g" \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
45 < '$(1)'/glew.pc.in > '$(1)'/glewmx.pc |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
46 |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
47 # Install |
285
08a32251156c
portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
48 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' |
08a32251156c
portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
49 $(INSTALL) -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/' |
08a32251156c
portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
50 $(INSTALL) -m644 '$(1)/libGLEW.a' '$(PREFIX)/$(TARGET)/lib/libglew32s.a' |
2271
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
51 $(INSTALL) -m644 '$(1)/libGLEWmx.a' '$(PREFIX)/$(TARGET)/lib/' |
1535
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
52 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' |
c38635d65658
package glew: make use of the provided pkg-config file
Martin Lambers <marlam@marlam.de>
parents:
1462
diff
changeset
|
53 $(INSTALL) -m644 '$(1)/glew.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig/' |
2271
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
54 $(INSTALL) -m644 '$(1)/glewmx.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig/' |
285
08a32251156c
portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
55 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' |
08a32251156c
portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
56 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/GL' |
08a32251156c
portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
57 $(INSTALL) -m644 '$(1)/include/GL/glew.h' '$(1)/include/GL/wglew.h' '$(PREFIX)/$(TARGET)/include/GL/' |
1992
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
1971
diff
changeset
|
58 |
2271
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
59 # Test |
1992
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
1971
diff
changeset
|
60 '$(TARGET)-gcc' \ |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
1971
diff
changeset
|
61 -W -Wall -Werror -ansi -pedantic \ |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
1971
diff
changeset
|
62 '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glew.exe' \ |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
1971
diff
changeset
|
63 `'$(TARGET)-pkg-config' glew --cflags --libs` |
2271
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
64 '$(TARGET)-gcc' \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
65 -W -Wall -Werror -ansi -pedantic \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
66 '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glewmx.exe' \ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
67 `'$(TARGET)-pkg-config' glewmx --cflags --libs` |
232
9f00b34a99dd
new package: glew (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
68 endef |