sdl_sound.mk 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. --program-prefix=''
  31. # enable mmx for newer x86's
  32. ifeq ($(BR2_i386)$(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y)
  33. SDL_SOUND_CONF_OPT += --enable-mmx
  34. else
  35. SDL_SOUND_CONF_OPT += --disable-mmx
  36. endif
  37. define SDL_SOUND_REMOVE_PLAYSOUND
  38. rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple)
  39. endef
  40. ifneq ($(BR2_PACKAGE_SDL_SOUND_PLAYSOUND),y)
  41. SDL_SOUND_POST_INSTALL_TARGET_HOOKS += SDL_SOUND_REMOVE_PLAYSOUND
  42. endif
  43. # target shared libs doesn't get removed by make uninstall if the .la
  44. # files are removed (E.G. if BR2_HAVE_DEVFILES isn't set)
  45. define SDL_SOUND_UNINSTALL_TARGET_CMDS
  46. $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(@D)
  47. rm -f $(TARGET_DIR)/usr/lib/libSDL_sound*so*
  48. endef
  49. $(eval $(call AUTOTARGETS,package,sdl_sound))