diff options
-rw-r--r-- | index.html | 4 | ||||
-rw-r--r-- | src/glfw2-1-no-build-test.patch | 25 | ||||
-rw-r--r-- | src/glfw2-test.c | 28 | ||||
-rw-r--r-- | src/glfw2.mk | 26 |
4 files changed, 83 insertions, 0 deletions
@@ -1346,6 +1346,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> <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> </tr> diff --git a/src/glfw2-1-no-build-test.patch b/src/glfw2-1-no-build-test.patch new file mode 100644 index 0000000..3f26022 --- /dev/null +++ b/src/glfw2-1-no-build-test.patch @@ -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 + + + ########################################################################### diff --git a/src/glfw2-test.c b/src/glfw2-test.c new file mode 100644 index 0000000..8542147 --- /dev/null +++ b/src/glfw2-test.c @@ -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; +} diff --git a/src/glfw2.mk b/src/glfw2.mk new file mode 100644 index 0000000..ef7d91b --- /dev/null +++ b/src/glfw2.mk @@ -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 |