sdl_sound.mk 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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_DEPENDENCIES = sdl
  11. ifneq ($(BR2_ENABLE_LOCALE),y)
  12. SDL_SOUND_DEPENDENCIES += libiconv
  13. endif
  14. # optional dependencies
  15. ifeq ($(BR2_PACKAGE_FLAC),y)
  16. SDL_SOUND_DEPENDENCIES += flac # is only used if ogg is also enabled
  17. endif
  18. ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
  19. SDL_SOUND_DEPENDENCIES += libvorbis
  20. endif
  21. ifeq ($(BR2_PACKAGE_SPEEX),y)
  22. SDL_SOUND_DEPENDENCIES += speex
  23. endif
  24. SDL_SOUND_CONF_OPT = \
  25. --with-sdl-prefix=$(STAGING_DIR)/usr \
  26. --with-sdl-exec-prefix=$(STAGING_DIR)/usr \
  27. --disable-sdltest \
  28. --enable-static
  29. # enable mmx for newer x86's
  30. ifeq ($(BR2_i386)$(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y)
  31. SDL_SOUND_CONF_OPT += --enable-mmx
  32. else
  33. SDL_SOUND_CONF_OPT += --disable-mmx
  34. endif
  35. define SDL_SOUND_REMOVE_PLAYSOUND
  36. rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple)
  37. endef
  38. ifneq ($(BR2_PACKAGE_SDL_SOUND_PLAYSOUND),y)
  39. SDL_SOUND_POST_INSTALL_TARGET_HOOKS += SDL_SOUND_REMOVE_PLAYSOUND
  40. endif
  41. # target shared libs doesn't get removed by make uninstall if the .la
  42. # files are removed (E.G. if BR2_HAVE_DEVFILES isn't set)
  43. define SDL_SOUND_UNINSTALL_TARGET_CMDS
  44. $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(@D)
  45. rm -f $(TARGET_DIR)/usr/lib/libSDL_sound*so*
  46. endef
  47. $(eval $(call AUTOTARGETS))