diff options
author | Sylvain Beucler <beuc@beuc.net> | 2014-06-18 20:51:14 (GMT) |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2014-08-04 23:44:49 (GMT) |
commit | c4061ea8df4570ca689cb954445e209c49834f0e (patch) | |
tree | 8aaa75189ae961ba6cf7f6e9531868387dbab9af /src | |
parent | 31a1a1e6dc194c9cb68a951e05b62b209bd56f75 (diff) | |
download | mxe-c4061ea8df4570ca689cb954445e209c49834f0e.zip mxe-c4061ea8df4570ca689cb954445e209c49834f0e.tar.gz mxe-c4061ea8df4570ca689cb954445e209c49834f0e.tar.bz2 |
sdl2_gfx: new Makefile
Some modifications made by me (Timothy):
- test program name changed to follow conventions
- checksum fixed
Signed-off-by: Timothy Gu <timothygu99@gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/sdl2_gfx-test.c | 25 | ||||
-rw-r--r-- | src/sdl2_gfx.mk | 34 |
2 files changed, 59 insertions, 0 deletions
diff --git a/src/sdl2_gfx-test.c b/src/sdl2_gfx-test.c new file mode 100644 index 0000000..c6a04ad --- /dev/null +++ b/src/sdl2_gfx-test.c @@ -0,0 +1,25 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include <SDL.h> +#include "SDL2_rotozoom.h" +#include "SDL2_framerate.h" + +int main(int argc, char* argv[]) +{ + FPSmanager framerate_manager; + + (void)argc; + (void)argv; + + if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1; + + SDL_initFramerate(&framerate_manager); + SDL_setFramerate(&framerate_manager, 60); + SDL_framerateDelay(&framerate_manager); + + SDL_Quit(); + return 0; +} diff --git a/src/sdl2_gfx.mk b/src/sdl2_gfx.mk new file mode 100644 index 0000000..c7dbba0 --- /dev/null +++ b/src/sdl2_gfx.mk @@ -0,0 +1,34 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := sdl2_gfx +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.0.1 +$(PKG)_CHECKSUM := a136873b71a8c00c0233db26e0c1dad9629b4209 +$(PKG)_SUBDIR := SDL2_gfx-$($(PKG)_VERSION) +$(PKG)_FILE := SDL2_gfx-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://www.ferzkopp.net/Software/SDL2_gfx/$($(PKG)_FILE) +$(PKG)_DEPS := gcc sdl2 + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://www.ferzkopp.net/joomla/content/view/19/14/' | \ + grep 'href.*tar\.' | \ + $(SED) -n 's,.*SDL2_gfx-\([0-9][^>]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --host='$(TARGET)' \ + --disable-shared \ + --prefix='$(PREFIX)/$(TARGET)' \ + --with-sdl-prefix='$(PREFIX)/$(TARGET)' + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_gfx.exe' \ + `'$(TARGET)-pkg-config' SDL2_gfx --cflags --libs` +endef + +$(PKG)_BUILD_SHARED = |