9b7f0c674999519ebcb5025166058c8ac08cfb58
[packages.git] / libs / libsdl / Makefile
1
2 # Copyright (C) 2009 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
11 PKG_VERSION:=1.2.14
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=SDL-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.libsdl.org/release/
16 PKG_MD5SUM:=e52086d1b508fa0b76c52ee30b55bec4
17 PKG_BUILD_DIR:=$(BUILD_DIR)/SDL-$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libsdl
22   SECTION:=libs
23   CATEGORY:=Libraries
24   TITLE:=Simple DirectMedia Layer
25   URL:=http://www.libsdl.org
26   DEPENDS:=+DirectFB
27 endef
28
29 define Package/libsdl/description
30  SDL is a library that allows programs portable low level access to a video
31  framebuffer, audio output, mouse, and keyboard.
32 endef
33
34 CONFIGURE_ARGS += \
35         --without-x
36
37 define Build/Compile
38         rm -rf $(PKG_INSTALL_DIR)
39         $(MAKE) -C $(PKG_BUILD_DIR) \
40                 DESTDIR="$(PKG_INSTALL_DIR)" \
41                 all install
42 endef
43
44 define Build/InstallDev
45         $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
46         $(CP) \
47                 $(PKG_INSTALL_DIR)/usr/include/SDL* \
48                 $(1)/usr/include/
49         $(CP) \
50                 $(PKG_INSTALL_DIR)/usr/lib/libSDL*.{a,so*} \
51                 $(1)/usr/lib/
52 endef
53
54 define Package/libsdl/install
55         $(INSTALL_DIR) $(1)/usr/lib
56         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL*.so.* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libsdl))