sdl_sound.mk 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #############################################################
  2. #
  3. # sdl_sound addon for SDL
  4. #
  5. #############################################################
  6. SDL_SOUND_VERSION:=1.0.3
  7. SDL_SOUND_SOURCE:=SDL_sound-$(SDL_SOUND_VERSION).tar.gz
  8. SDL_SOUND_SITE:=http://icculus.org/SDL_sound/downloads/
  9. SDL_SOUND_INSTALL_STAGING:=YES
  10. SDL_SOUND_INSTALL_TARGET:=YES
  11. SDL_SOUND_DEPENDENCIES = sdl
  12. ifneq ($(BR2_ENABLE_LOCALE),y)
  13. SDL_SOUND_DEPENDENCIES += libiconv
  14. endif
  15. # optional dependencies
  16. ifeq ($(BR2_PACKAGE_FLAC),y)
  17. SDL_SOUND_DEPENDENCIES += flac # is only used if ogg is also enabled
  18. endif
  19. ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
  20. SDL_SOUND_DEPENDENCIES += libvorbis
  21. endif
  22. ifeq ($(BR2_PACKAGE_SPEEX),y)
  23. SDL_SOUND_DEPENDENCIES += speex
  24. endif
  25. SDL_SOUND_CONF_OPT = \
  26. --with-sdl-prefix=$(STAGING_DIR)/usr \
  27. --with-sdl-exec-prefix=$(STAGING_DIR)/usr \
  28. --disable-sdltest \
  29. --enable-static
  30. # enable mmx for newer x86's
  31. ifeq ($(BR2_i386)$(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y)
  32. SDL_SOUND_CONF_OPT += --enable-mmx
  33. else
  34. SDL_SOUND_CONF_OPT += --disable-mmx
  35. endif
  36. define SDL_SOUND_REMOVE_PLAYSOUND
  37. rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple)
  38. endef
  39. ifneq ($(BR2_PACKAGE_SDL_SOUND_PLAYSOUND),y)
  40. SDL_SOUND_POST_INSTALL_TARGET_HOOKS += SDL_SOUND_REMOVE_PLAYSOUND
  41. endif
  42. # target shared libs doesn't get removed by make uninstall if the .la
  43. # files are removed (E.G. if BR2_HAVE_DEVFILES isn't set)
  44. define SDL_SOUND_UNINSTALL_TARGET_CMDS
  45. $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(@D)
  46. rm -f $(TARGET_DIR)/usr/lib/libSDL_sound*so*
  47. endef
  48. $(eval $(call AUTOTARGETS))