On Thu, Jul 12, 2018 at 07:30:52PM +0200, Michael Grzeschik wrote:
> Signed-off-by: Michael Grzeschik <m.grzesc...@pengutronix.de>
> ---
>  rules/sdl2-test.in   |  11 +++
>  rules/sdl2-test.make | 165 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 176 insertions(+)
>  create mode 100644 rules/sdl2-test.in
>  create mode 100644 rules/sdl2-test.make
> 
> diff --git a/rules/sdl2-test.in b/rules/sdl2-test.in
> new file mode 100644
> index 000000000..f822c965c
> --- /dev/null
> +++ b/rules/sdl2-test.in
> @@ -0,0 +1,11 @@
> +## SECTION=multimedia_sdl
> +
> +config SDL2_TEST
> +     tristate
> +     prompt "SDL2 test"
> +     select SDL2
> +     help
> +       Simple DirectMedia Layer is a cross-platform multimedia
> +       library designed to provide low level access to audio,
> +       keyboard, mouse, joystick, 3D hardware via OpenGL, and
> +       2D video framebuffer.
> diff --git a/rules/sdl2-test.make b/rules/sdl2-test.make
> new file mode 100644
> index 000000000..b36f996f2
> --- /dev/null
> +++ b/rules/sdl2-test.make
> @@ -0,0 +1,165 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2018 by Michael Grzeschik <m...@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_SDL2_TEST) += sdl2-test
> +
> +#
> +# Paths and names
> +#
> +SDL2_TEST_VERSION    = $(SDL2_VERSION)
> +SDL2_TEST_MD5                = $(SDL2_MD5)
> +SDL2_TEST            = SDL2_TEST-$(SDL2_VERSION)
> +SDL2_TEST_SUFFIX     = $(SDL2_SUFFIX)
> +SDL2_TEST_URL                = $(SDL2_URL)
> +SDL2_TEST_SOURCE     = $(SDL2_SOURCE)
> +SDL2_TEST_DIR                = $(BUILDDIR)/$(SDL2_TEST)
> +SDL2_TEST_SUBDIR     := test
> +SDL2_TESTS_LICENSE   := zlib
> +
> +# 
> ----------------------------------------------------------------------------
> +# Prepare
> +# 
> ----------------------------------------------------------------------------
> +
> +SDL2_TEST_ENV                := \
> +     $(CROSS_ENV) \
> +     SDL_LIBS="-lSDL2 -lunwind -lunwind-generic"
> +
> +#
> +# autoconf
> +#
> +SDL2_TEST_CONF_TOOL  := autoconf
> +
> +
> +ifdef PTXCONF_SDL2_PULSEAUDIO
> +SDL2_TEST_LDFLAGS    := \
> +     -Wl,-rpath-link,$(SYSROOT)/usr/lib/pulseaudio
> +endif
> +
> +# 
> ----------------------------------------------------------------------------
> +# Install
> +# 
> ----------------------------------------------------------------------------
> +
> +SDL2_TEST_TOOLS := \
> +     checkkeys \
> +     controllermap \
> +     loopwave \
> +     loopwavequeue \
> +     testatomic \
> +     testaudiocapture \
> +     testaudiohotplug \
> +     testaudioinfo \
> +     testautomation \
> +     testbounds \
> +     testcustomcursor \
> +     testdisplayinfo \
> +     testdraw2 \
> +     testdrawchessboard \
> +     testdropfile \
> +     testerror \
> +     testfile \
> +     testfilesystem \
> +     testgamecontroller \
> +     testgesture \
> +     testgl2 \
> +     testgles \
> +     testgles2 \
> +     testhaptic \
> +     testhittesting \
> +     testhotplug \
> +     testiconv \
> +     testime \
> +     testintersections \
> +     testjoystick \
> +     testkeys \
> +     testloadso \
> +     testlock \
> +     testmessage \
> +     testmultiaudio \
> +     testnative \
> +     testoverlay2 \
> +     testplatform \
> +     testpower \
> +     testqsort \
> +     testrelative \
> +     testrendercopyex \
> +     testrendertarget \
> +     testresample \
> +     testrumble \
> +     testscale \
> +     testsem \
> +     testshader \
> +     testshape \
> +     testsprite2 \
> +     testspriteminimal \
> +     teststreaming \
> +     testthread \
> +     testtimer \
> +     testver \
> +     testviewport \
> +     testvulkan \
> +     testwm2 \
> +     testyuv \
> +     torturethread
> +
> +SDL2_TEST_DATA := \
> +     axis.bmp \
> +     button.bmp \
> +     controllermap.bmp \
> +     icon.bmp \
> +     sample.bmp \
> +     testyuv.bmp \
> +     sample.wav \
> +     picture.xbm
> +
> +$(STATEDIR)/sdl2-test.install:
> +     @$(call targetinfo)
> +     @for file in $(SDL2_TEST_TOOLS); \
> +        do \
> +          install -vD -m 0755 $(SDL2_TEST_DIR)/$(SDL2_TEST_SUBDIR)/$${file} \
> +            $(SDL2_TEST_PKGDIR)/usr/bin/$${file}; \
> +        done
> +     @for file in $(SDL2_TEST_DATA); \
> +        do \
> +          install -vD -m 0644 $(SDL2_TEST_DIR)/$(SDL2_TEST_SUBDIR)/$${file} \
> +            $(SDL2_TEST_PKGDIR)/usr/bin/$${file}; \
> +        done

use $(foreach ... and '$(ptx/nl)' instead of ';'

> +     @$(call touch)
> +
> +# 
> ----------------------------------------------------------------------------
> +# Target-Install
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/sdl2-test.targetinstall:
> +     @$(call targetinfo)
> +
> +     @$(call install_init, sdl2-test)
> +     @$(call install_fixup, sdl2-test,PRIORITY,optional)
> +     @$(call install_fixup, sdl2-test,SECTION,base)
> +     @$(call install_fixup, sdl2-test,AUTHOR,"Michael Grzeschik 
> <m...@pengutronix.de>")
> +     @$(call install_fixup, sdl2-test,DESCRIPTION,missing)
> +
> +     @for file in $(SDL2_TEST_TOOLS); \
> +        do \
> +           $(call install_copy, sdl2-test, 0, 0, 755, -, /usr/bin/$$file) \
> +        done
> +
> +     @for file in $(SDL2_TEST_DATA); \
> +        do \
> +           $(call install_copy, sdl2-test, 0, 0, 644, -, /usr/bin/$$file) \
> +        done

dito.

Michael

> +
> +     @$(call install_finish, sdl2-test)
> +
> +     @$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.18.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to