Root/libsdl-image/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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=libsdl-image
11PKG_VERSION:=1.2.10
12PKG_RELEASE:=1
13
14PKG_SOURCE:=SDL_image-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_image/release/
16PKG_MD5SUM:=6c06584b31559e2b59f2b982d0d1f628
17PKG_BUILD_DIR:=$(BUILD_DIR)/SDL_image-$(PKG_VERSION)
18
19PKG_INSTALL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/libsdl-image
24  SECTION:=libs
25  CATEGORY:=Libraries
26  TITLE:=Simple DirectMedia Layer Image
27  URL:=http://www.libsdl.org/projects/SDL_image/
28  DEPENDS:=+libsdl
29endef
30
31define Package/libsdl-image/description
32  SDL_image is an image loading library that is used with the SDL library, and almost as portable. It allows a programmer to use multiple image formats without having to code all the loading and conversion algorithms themselves.
33endef
34
35TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL
36
37CONFIGURE_ARGS += \
38    --with-sdl-exec-prefix=$(STAGING_DIR)
39
40CONFIGURE_VARS += \
41    LIBS="-lSDL -ldirect -ldirectfb -lfusion"
42
43define Build/InstallDev
44    $(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib/pkgconfig
45    $(CP) \
46        $(PKG_INSTALL_DIR)/usr/include/SDL/SDL_image.h \
47        $(1)/usr/include/SDL/
48    $(CP) \
49        $(PKG_INSTALL_DIR)/usr/lib/libSDL_image*.{a,so*} \
50        $(1)/usr/lib/
51    $(INSTALL_DATA) \
52        $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
53        $(1)/usr/lib/pkgconfig/
54endef
55
56define Package/libsdl-image/install
57    $(INSTALL_DIR) $(1)/usr/lib
58    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL_image*.so* $(1)/usr/lib/
59endef
60
61$(eval $(call BuildPackage,libsdl-image))
62

Archive Download this file



interactive