diff options
Diffstat (limited to 'src/glfw2.mk')
-rw-r--r-- | src/glfw2.mk | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/glfw2.mk b/src/glfw2.mk new file mode 100644 index 0000000..de7abec --- /dev/null +++ b/src/glfw2.mk @@ -0,0 +1,32 @@ +# 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 + $(WGET) -q -O- 'http://sourceforge.net/projects/glfw/files/glfw/' | \ + $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ + grep '^2\.' | \ + $(SORT) -V | \ + tail -1 +endef + +define $(PKG)_BUILD + cd '$(1)/lib/win32' && $(MAKE) -f Makefile.win32.cross-mgw \ + TARGET=$(TARGET)- \ + PREFIX='$(PREFIX)/$(TARGET)' \ + install -j '$(JOBS)' + + #Test + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glfw2.exe' \ + `'$(TARGET)-pkg-config' libglfw --cflags --libs` +endef |