diff src/sdl_mixer.mk @ 736:9232c79dac70

bugfix and test program for package sdl_mixer
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 14 Feb 2010 19:59:37 +0100
parents 29f1ba4559ae
children 7b15d99ad223
line wrap: on
line diff
--- a/src/sdl_mixer.mk	Sun Feb 14 19:59:01 2010 +0100
+++ b/src/sdl_mixer.mk	Sun Feb 14 19:59:37 2010 +0100
@@ -20,6 +20,12 @@
 endef
 
 define $(PKG)_BUILD
+    $(SED) 's,^\(Requires:.*\),\1 vorbisfile,' -i '$(1)/SDL_mixer.pc.in'
+    echo \
+        'Libs.private:' \
+        "`$(PREFIX)/$(TARGET)/bin/libmikmod-config --libs`" \
+        "`$(PREFIX)/$(TARGET)/bin/smpeg-config     --libs`" \
+        >> '$(1)/SDL_mixer.pc.in'
     $(SED) 's,for path in /usr/local; do,for path in; do,' -i '$(1)/configure'
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
@@ -40,4 +46,11 @@
         LIBMIKMOD_CONFIG='$(PREFIX)/$(TARGET)/bin/libmikmod-config' \
         LIBS='-lvorbis -logg'
     $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+
+    '$(TARGET)-gcc' \
+        -W -Wall -Werror -ansi -pedantic \
+        `'$(TARGET)-pkg-config' SDL_mixer --cflags` \
+        '$(2).c' \
+        `'$(TARGET)-pkg-config' SDL_mixer --libs` \
+        -o '$(PREFIX)/$(TARGET)/bin/test-sdl_mixer.exe'
 endef