peerguardian: Remove uclibc++ dep.
[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:=2
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 CONFIGURE_ARGS+= \
39 --enable-libc \
40 --enable-video \
41 --enable-events \
42 --enable-joystick \
43 --enable-cdrom \
44 --enable-threads \
45 --enable-timers \
46 --enable-file \
47 --enable-loadso \
48 --enable-cpuinfo \
49 --enable-assembly \
50 --disable-oss \
51 --disable-alsatest \
52 --enable-alsa-shared \
53 --disable-esd \
54 --disable-esdtest \
55 --enable-esd-shared \
56 --disable-pulseaudio \
57 --enable-pulseaudio-shared \
58 --disable-arts \
59 --enable-arts-shared \
60 --disable-nas \
61 --enable-nas-shared \
62 --disable-diskaudio \
63 --disable-dummyaudio \
64 --disable-mintaudio \
65 --disable-nasm \
66 --disable-altivec \
67 --disable-ipod \
68 --disable-nanox \
69 --disable-video-x11 \
70 --enable-x11-shared \
71 --enable-dga \
72 --enable-video-dga \
73 --enable-video-x11-dgamouse \
74 --enable-video-x11-vm \
75 --enable-video-x11-xv \
76 --disable-video-x11-xinerama \
77 --disable-video-x11-xme \
78 --disable-video-x11-xrandr \
79 --disable-video-photon \
80 --disable-video-carbon \
81 --disable-video-cocoa \
82 --enable-video-fbcon \
83 --enable-video-directfb \
84 --disable-video-ps2gs \
85 --disable-video-ps3 \
86 --disable-video-ggi \
87 --disable-video-svga \
88 --disable-video-vgl \
89 --disable-video-wscons \
90 --disable-video-aalib \
91 --disable-video-caca \
92 --disable-video-qtopia \
93 --disable-video-picogui \
94 --disable-video-xbios \
95 --disable-video-gem \
96 --disable-video-dummy \
97 --disable-video-opengl \
98 --disable-osmesa-shared \
99 --disable-screensaver \
100 --enable-input-events \
101 --disable-input-tslib \
102 --enable-pth \
103 --enable-pthreads \
104 --enable-pthread-sem \
105 --disable-stdio-redirect \
106 --disable-directx \
107 --enable-sdl-dlopen \
108 --disable-atari-ldg \
109 --disable-clock_gettime \
110 --without-x \
111 --disable-rpath \
112
113 ifneq ($(CONFIG_AUDIO_SUPPORT),)
114 CONFIGURE_ARGS+= \
115 --enable-audio \
116 --enable-alsa
117 else
118 CONFIGURE_ARGS+= \
119 --disable-audio \
120 --disable-alsa
121 endif
122
123 CONFIGURE_VARS+= \
124 ac_cv_path_DIRECTFBCONFIG=no \
125
126 define Build/InstallDev
127 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
128 $(CP) \
129 $(PKG_INSTALL_DIR)/usr/include/SDL* \
130 $(1)/usr/include/
131 $(CP) \
132 $(PKG_INSTALL_DIR)/usr/lib/libSDL*.{a,so*} \
133 $(1)/usr/lib/
134 $(INSTALL_DATA) \
135 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
136 $(1)/usr/lib/pkgconfig
137
138
139 $(INSTALL_DIR) $(1)/usr/share/aclocal
140 $(INSTALL_DATA) \
141 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
142 $(1)/usr/share/aclocal/
143
144 $(INSTALL_DIR) $(1)/usr/bin
145 $(INSTALL_BIN) \
146 $(PKG_INSTALL_DIR)/usr/bin/sdl-config \
147 $(1)/usr/bin/
148
149 $(SED) 's,^\(exec_prefix\|prefix\)=.*,\1=\"$(STAGING_DIR)/usr/\",g' \
150 $(1)/usr/bin/sdl-config
151
152 $(INSTALL_DIR) $(1)/host/bin
153 ln -sf ../../usr/bin/sdl-config $(1)/host/bin/
154 endef
155
156 define Package/libsdl/install
157 $(INSTALL_DIR) $(1)/usr/lib
158 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL*.so.* $(1)/usr/lib/
159 endef
160
161 $(eval $(call BuildPackage,libsdl))