xref: /OK3568_Linux_fs/buildroot/package/sdl_sound/sdl_sound.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# sdl_sound
4#
5################################################################################
6
7SDL_SOUND_VERSION = 1.0.3
8SDL_SOUND_SOURCE = SDL_sound-$(SDL_SOUND_VERSION).tar.gz
9SDL_SOUND_SITE = http://icculus.org/SDL_sound/downloads
10SDL_SOUND_LICENSE = LGPL-2.1+
11SDL_SOUND_LICENSE_FILES = COPYING
12SDL_SOUND_INSTALL_STAGING = YES
13SDL_SOUND_DEPENDENCIES = sdl
14SDL_SOUND_CONF_OPTS = \
15	--with-sdl-prefix=$(STAGING_DIR)/usr \
16	--with-sdl-exec-prefix=$(STAGING_DIR)/usr \
17	--disable-sdltest \
18	--enable-static
19
20ifneq ($(BR2_ENABLE_LOCALE),y)
21SDL_SOUND_DEPENDENCIES += libiconv
22endif
23
24# optional dependencies
25ifeq ($(BR2_PACKAGE_FLAC)$(BR2_PACKAGE_LIBOGG),yy)
26SDL_SOUND_CONF_OPTS += --enable-flac
27SDL_SOUND_DEPENDENCIES += flac libogg
28else
29SDL_SOUND_CONF_OPTS += --disable-flac
30endif
31
32ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
33SDL_SOUND_CONF_OPTS += --enable-modplug
34SDL_SOUND_DEPENDENCIES += libmodplug
35else
36SDL_SOUND_CONF_OPTS += --disable-modplug
37endif
38
39ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
40SDL_SOUND_CONF_OPTS += --enable-ogg
41SDL_SOUND_DEPENDENCIES += libvorbis
42else
43SDL_SOUND_CONF_OPTS += --disable-ogg
44endif
45
46ifeq ($(BR2_PACKAGE_SPEEX),y)
47SDL_SOUND_CONF_OPTS += --enable-speex
48SDL_SOUND_DEPENDENCIES += speex
49else
50SDL_SOUND_CONF_OPTS += --disable-speex
51endif
52
53ifeq ($(BR2_PACKAGE_PHYSFS),y)
54SDL_SOUND_CONF_OPTS += --enable-physfs
55SDL_SOUND_DEPENDENCIES += physfs
56else
57SDL_SOUND_CONF_OPTS += --disable-physfs
58endif
59
60ifeq ($(BR2_X86_CPU_HAS_MMX),y)
61SDL_SOUND_CONF_OPTS += --enable-mmx
62else
63SDL_SOUND_CONF_OPTS += --disable-mmx
64endif
65
66define SDL_SOUND_REMOVE_PLAYSOUND
67	rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple)
68endef
69
70ifneq ($(BR2_PACKAGE_SDL_SOUND_PLAYSOUND),y)
71SDL_SOUND_POST_INSTALL_TARGET_HOOKS += SDL_SOUND_REMOVE_PLAYSOUND
72endif
73
74$(eval $(autotools-package))
75