Added glfw (version 2) package

This commit is contained in:
Daniele Di Proietto 2013-11-02 13:08:26 +01:00
parent e2c4e560e2
commit dd60b2f817
4 changed files with 83 additions and 0 deletions

View File

@ -1350,6 +1350,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
<td class="package">glew</td>
<td class="website"><a href="http://glew.sourceforge.net/">GLEW</a></td>
</tr>
<tr>
<td class="package">glfw2</td>
<td class="website"><a href="http://www.glfw.org/">GLEW</a></td>
</tr>
<tr>
<td class="package">glib</td>
<td class="website"><a href="http://www.gtk.org/">GLib</a></td>

View File

@ -0,0 +1,25 @@
This file is part of MXE.
See index.html for further information.
Do not waste time building examples and tests. We use our test
--- a/Makefile
+++ b/Makefile
@@ -128,13 +128,13 @@
cross-mgw:
cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw
- cd examples && $(MAKE) -f Makefile.win32.cross-mgw
- cd tests && $(MAKE) -f Makefile.win32.cross-mgw
+ #cd examples && $(MAKE) -f Makefile.win32.cross-mgw
+ #cd tests && $(MAKE) -f Makefile.win32.cross-mgw
cross-mgw-clean:
cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw clean
- cd examples && $(MAKE) -f Makefile.win32.cross-mgw clean
- cd tests && $(MAKE) -f Makefile.win32.cross-mgw clean
+ #cd examples && $(MAKE) -f Makefile.win32.cross-mgw clean
+ #cd tests && $(MAKE) -f Makefile.win32.cross-mgw clean
###########################################################################

28
src/glfw2-test.c Normal file
View File

@ -0,0 +1,28 @@
/*
* This file is part of MXE.
* See index.html for further information.
*/
#include <stdlib.h>
#include <GL/glfw.h>
int main(void)
{
/* Initialise GLFW */
if( !glfwInit() )
{
return EXIT_FAILURE;
}
/* Open a window and create its OpenGL context */
if( !glfwOpenWindow( 640, 480, 0,0,0,0, 0,0, GLFW_WINDOW ) )
{
glfwTerminate();
return EXIT_FAILURE;
}
/* Close OpenGL window and terminate GLFW*/
glfwTerminate();
return EXIT_SUCCESS;
}

26
src/glfw2.mk Normal file
View File

@ -0,0 +1,26 @@
# This file is part of MXE.
# See index.html for further information.
PKG := glfw2
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.7.9
$(PKG)_CHECKSUM := b189922e9804062a0014a3799b4dc35431034623
$(PKG)_SUBDIR := glfw-$($(PKG)_VERSION)
$(PKG)_FILE := glfw-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glfw/glfw/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
echo 'TODO: write update script for $(PKG).' >&2;
echo $($(PKG)_VERSION)
endef
define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j '$(JOBS)' cross-mgw-install TARGET=$(TARGET)- PREFIX='$(PREFIX)/$(TARGET)'
#Test
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glfw.exe' \
`'$(TARGET)-pkg-config' libglfw --cflags --libs`
endef