libsdl_{mixer,sound}: Fix copying of libraries to the rootfs
[openwrt/svn-archive/archive.git] / libs / libsdl_mixer / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libsdl-mixer
11 PKG_VERSION:=1.2.11
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=SDL_mixer-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_mixer/release/
16 PKG_MD5SUM:=65ada3d997fe85109191a5fb083f248c
17 PKG_BUILD_DIR:=$(BUILD_DIR)/SDL_mixer-$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libsdl-mixer
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Simple DirectMedia Layer Sound Mixer
25 URL:=http://www.libsdl.org/projects/SDL_mixer/
26 DEPENDS:=+libsdl +libmikmod
27 endef
28
29 define Package/libsdl-mixer/description
30 SDL_mixer is a sample multi-channel audio mixer library.
31 endef
32
33 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL
34
35 CONFIGURE_ARGS += \
36 --with-sdl-exec-prefix=$(PKG_BUILD_DIR)
37
38 define Build/Configure
39 $(INSTALL_DIR) $(PKG_BUILD_DIR)/bin
40 $(INSTALL_BIN) ./files/sdl-config $(PKG_BUILD_DIR)/bin/
41 $(call Build/Configure/Default)
42 endef
43
44 define Build/Compile
45 rm -rf $(PKG_INSTALL_DIR)
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 all install
49 endef
50
51 define Build/InstallDev
52 $(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib
53 $(CP) \
54 $(PKG_INSTALL_DIR)/usr/include/SDL/SDL_mixer.h \
55 $(1)/usr/include/SDL/
56 $(CP) \
57 $(PKG_INSTALL_DIR)/usr/lib/libSDL_mixer*.{a,so*} \
58 $(1)/usr/lib/
59 endef
60
61 define Package/libsdl-mixer/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL_mixer*.so* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libsdl-mixer))