c86cd382365f6b78638132e9edadb2516c846333
[openwrt/svn-archive/archive.git] / libs / libsdl / 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:=SDL
11 PKG_VERSION:=1.2.14
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.libsdl.org/release/
16 PKG_MD5SUM:=e52086d1b508fa0b76c52ee30b55bec4
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 PKG_CONFIG_DEPENDS:=CONFIG_AUDIO_SUPPORT
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libsdl
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Simple DirectMedia Layer
29 URL:=http://www.libsdl.org
30 DEPENDS:=+DirectFB +zlib +libpthread +AUDIO_SUPPORT:alsa-lib
31 endef
32
33 define Package/libsdl/description
34 SDL is a library that allows programs portable low level access to a video
35 framebuffer, audio output, mouse, and keyboard.
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default, \
40 --enable-libc \
41 $(if $(CONFIG_AUDIO_SUPPORT), \
42 --enable-audio \
43 --enable-alsa \
44 , \
45 --disable-audio \
46 --disable-alsa \
47 ) \
48 --enable-video \
49 --enable-events \
50 --enable-joystick \
51 --enable-cdrom \
52 --enable-threads \
53 --enable-timers \
54 --enable-file \
55 --enable-loadso \
56 --enable-cpuinfo \
57 --enable-assembly \
58 --disable-oss \
59 --disable-alsatest \
60 --enable-alsa-shared \
61 --disable-esd \
62 --disable-esdtest \
63 --enable-esd-shared \
64 --disable-pulseaudio \
65 --enable-pulseaudio-shared \
66 --disable-arts \
67 --enable-arts-shared \
68 --disable-nas \
69 --enable-nas-shared \
70 --disable-diskaudio \
71 --disable-dummyaudio \
72 --disable-mintaudio \
73 --disable-nasm \
74 --disable-altivec \
75 --disable-ipod \
76 --disable-nanox \
77 --disable-video-x11 \
78 --enable-x11-shared \
79 --enable-dga \
80 --enable-video-dga \
81 --enable-video-x11-dgamouse \
82 --enable-video-x11-vm \
83 --enable-video-x11-xv \
84 --disable-video-x11-xinerama \
85 --disable-video-x11-xme \
86 --disable-video-x11-xrandr \
87 --disable-video-photon \
88 --disable-video-carbon \
89 --disable-video-cocoa \
90 --disable-video-fbcon \
91 --enable-video-directfb \
92 --disable-video-ps2gs \
93 --disable-video-ps3 \
94 --disable-video-ggi \
95 --disable-video-svga \
96 --disable-video-vgl \
97 --disable-video-wscons \
98 --disable-video-aalib \
99 --disable-video-caca \
100 --disable-video-qtopia \
101 --disable-video-picogui \
102 --disable-video-xbios \
103 --disable-video-gem \
104 --disable-video-dummy \
105 --disable-video-opengl \
106 --disable-osmesa-shared \
107 --disable-screensaver \
108 --enable-input-events \
109 --disable-input-tslib \
110 --enable-pth \
111 --enable-pthreads \
112 --enable-pthread-sem \
113 --disable-stdio-redirect \
114 --disable-directx \
115 --enable-sdl-dlopen \
116 --disable-atari-ldg \
117 --disable-clock_gettime \
118 --without-x \
119 --enable-rpath \
120 , \
121 ac_cv_path_DIRECTFBCONFIG=no \
122 )
123 endef
124
125 define Build/InstallDev
126 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
127 $(CP) \
128 $(PKG_INSTALL_DIR)/usr/include/SDL* \
129 $(1)/usr/include/
130 $(CP) \
131 $(PKG_INSTALL_DIR)/usr/lib/libSDL*.{a,so*} \
132 $(1)/usr/lib/
133 $(INSTALL_DATA) \
134 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
135 $(1)/usr/lib/pkgconfig
136
137
138 $(INSTALL_DIR) $(1)/usr/share/aclocal
139 $(INSTALL_DATA) \
140 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
141 $(1)/usr/share/aclocal/
142
143 $(INSTALL_DIR) $(1)/host/bin
144 $(INSTALL_BIN) \
145 $(PKG_INSTALL_DIR)/usr/bin/sdl-config \
146 $(1)/host/bin
147
148 $(SED) 's,^\(exec_prefix\|prefix\)=.*,\1=\"$(STAGING_DIR)/usr/\",g' \
149 $(1)/host/bin/sdl-config
150 endef
151
152 define Package/libsdl/install
153 $(INSTALL_DIR) $(1)/usr/lib
154 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL*.so.* $(1)/usr/lib/
155 endef
156
157 $(eval $(call BuildPackage,libsdl))