summaryrefslogtreecommitdiff
path: root/package/sdl_sound/sdl_sound.mk
blob: 5058551b017dcf6925228825ef88fc3bfc949ea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#############################################################
#
# sdl_sound addon for SDL
#
#############################################################
SDL_SOUND_VERSION:=1.0.3
SDL_SOUND_SOURCE:=SDL_sound-$(SDL_SOUND_VERSION).tar.gz
SDL_SOUND_SITE:=http://icculus.org/SDL_sound/downloads/
SDL_SOUND_LIBTOOL_PATCH:=NO
SDL_SOUND_INSTALL_STAGING:=YES
SDL_SOUND_INSTALL_TARGET:=YES
SDL_SOUND_DEPENDENCIES = sdl

ifneq ($(BR2_ENABLE_LOCALE),y)
SDL_SOUND_DEPENDENCIES += libiconv
endif

SDL_SOUND_CONF_OPT:=--with-sdl-prefix=$(STAGING_DIR)/usr \
		--with-sdl-exec-prefix=$(STAGING_DIR)/usr \
		--disable-sdltest \
		--enable-static \
		--program-prefix=''

# enable mmx for newer x86's
ifeq ($(BR2_i386)$(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y)
SDL_SOUND_CONF_OPT += --enable-mmx
else
SDL_SOUND_CONF_OPT += --disable-mmx
endif

$(eval $(call AUTOTARGETS,package,sdl_sound))

ifneq ($(BR2_PACKAGE_SDL_SOUND_PLAYSOUND),y)
$(SDL_SOUND_HOOK_POST_INSTALL):
	rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple)
	touch $@
endif

# target shared libs doesn't get removed by make uninstall if the .la files
# are removed (E.G. if BR2_HAVE_DEVFILES isn't set)
$(SDL_SOUND_TARGET_UNINSTALL):
	$(call MESSAGE,"Uninstalling")
	$(MAKE) DESTDIR=$(STAGING_DIR) uninstall -C $(@D)/$(SDL_SOUND_SUBDIR)
	rm -f $(@D)/.stamp_staging_installed
	$(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(@D)/$(SDL_SOUND_SUBDIR)
	rm -f $(TARGET_DIR)/usr/lib/libSDL_sound*so*
	rm -f $(SDL_SOUND_TARGET_INSTALL_TARGET) $(SDL_SOUND_HOOK_POST_INSTALL)