summaryrefslogtreecommitdiffstats
path: root/src/sfml.mk
diff options
context:
space:
mode:
authorGuilherme Bernal <lb-guilherme@live.com>2013-06-24 14:05:03 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-07-06 08:53:40 (GMT)
commit86b660d258f2a6610b96f8fbd8c583cc46c6727d (patch)
tree062e566774b6e07bd3d21e271c7105b1d386ca71 /src/sfml.mk
parent50cecd1eae51b92d85a3b8773b6ef2d465b139bb (diff)
downloadmxe-86b660d258f2a6610b96f8fbd8c583cc46c6727d.zip
mxe-86b660d258f2a6610b96f8fbd8c583cc46c6727d.tar.gz
mxe-86b660d258f2a6610b96f8fbd8c583cc46c6727d.tar.bz2
add package sfml
Diffstat (limited to 'src/sfml.mk')
-rw-r--r--src/sfml.mk34
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