diff options
Diffstat (limited to 'src/sfml.mk')
-rw-r--r-- | src/sfml.mk | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/sfml.mk b/src/sfml.mk new file mode 100644 index 0000000..04a2bf8 --- /dev/null +++ b/src/sfml.mk @@ -0,0 +1,34 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := sfml +$(PKG)_IGNORE := +$(PKG)_CHECKSUM := ff8cf290f49e1a1d8517a4a344e9214139da462f +$(PKG)_SUBDIR := SFML-$($(PKG)_VERSION) +$(PKG)_FILE := SFML-$($(PKG)_VERSION)-sources.zip +$(PKG)_URL := http://sfml-dev.org/download/sfml/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc freetype glew jpeg openal libsndfile + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://www.sfml-dev.org/download.php' | \ + grep 'download/sfml/' | \ + $(SED) -n 's,.*\([0-9.]\+\).*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + mkdir '$(1)/build' + cd '$(1)/build' && cmake .. \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + + $(MAKE) -C '$(1)/build' -j '$(JOBS)' install VERBOSE=1 + + '$(TARGET)-g++' \ + -W -Wall -Werror \ + -DSFML_STATIC -DAL_LIBTYPE_STATIC \ + '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-sfml.exe' \ + -lsfml-audio-s -lsfml-network-s -lsfml-graphics-s -lsfml-window-s -lsfml-system-s \ + -lGLEW -lopengl32 -lgdi32 -lOpenAL32 -lwinmm -luuid -lole32 -ljpeg \ + -lsndfile -lws2_32 -lfreetype -lFLAC -lvorbisenc -lvorbis -logg -lm -lpng -lz -lbz2 + +endef |