1 ################################################################################
5 ################################################################################
8 SDL2_SOURCE
= SDL2-
$(SDL2_VERSION
).
tar.gz
9 SDL2_SITE
= http
://www.libsdl.org
/release
11 SDL2_LICENSE_FILES
= COPYING.txt
12 SDL2_INSTALL_STAGING
= YES
13 SDL2_CONFIG_SCRIPTS
= sdl2-config
20 --disable-pulseaudio \
21 --disable-video-opengl \
22 --disable-video-opengles \
23 --disable-video-wayland
25 # We must enable static build to get compilation successful.
26 SDL2_CONF_OPTS
+= --enable-static
28 ifeq ($(BR2_PACKAGE_HAS_UDEV
),y
)
29 SDL2_DEPENDENCIES
+= udev
30 SDL2_CONF_OPTS
+= --enable-libudev
32 SDL2_CONF_OPTS
+= --disable-libudev
35 ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB
),y
)
36 SDL2_DEPENDENCIES
+= directfb
37 SDL2_CONF_OPTS
+= --enable-video-directfb
38 SDL2_CONF_ENV
= ac_cv_path_DIRECTFBCONFIG
=$(STAGING_DIR
)/usr
/bin
/directfb-config
40 SDL2_CONF_OPTS
+= --disable-video-directfb
43 # x-includes and x-libraries must be set for cross-compiling
44 # By default x_includes and x_libraries contains unsafe paths.
45 # (/usr/X11R6/include and /usr/X11R6/lib)
46 ifeq ($(BR2_PACKAGE_SDL2_X11
),y
)
47 SDL2_DEPENDENCIES
+= xlib_libX11 xlib_libXext
49 # X11/extensions/shape.h is provided by libXext.
50 SDL2_CONF_OPTS
+= --enable-video-x11 \
51 --with-x
=$(STAGING_DIR
) \
52 --x-includes
=$(STAGING_DIR
)/usr
/include \
53 --x-libraries
=$(STAGING_DIR
)/usr
/lib \
54 --enable-video-x11-xshape
56 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR
),y
)
57 SDL2_DEPENDENCIES
+= xlib_libXcursor
58 SDL2_CONF_OPTS
+= --enable-video-x11-xcursor
60 SDL2_CONF_OPTS
+= --disable-video-x11-xcursor
63 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA
),y
)
64 SDL2_DEPENDENCIES
+= xlib_libXinerama
65 SDL2_CONF_OPTS
+= --enable-video-x11-xinerama
67 SDL2_CONF_OPTS
+= --disable-video-x11-xinerama
70 ifeq ($(BR2_PACKAGE_XLIB_LIBXI
),y
)
71 SDL2_DEPENDENCIES
+= xlib_libXi
72 SDL2_CONF_OPTS
+= --enable-video-x11-xinput
74 SDL2_CONF_OPTS
+= --disable-video-x11-xinput
77 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR
),y
)
78 SDL2_DEPENDENCIES
+= xlib_libXrandr
79 SDL2_CONF_OPTS
+= --enable-video-x11-xrandr
81 SDL2_CONF_OPTS
+= --disable-video-x11-xrandr
84 ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER
),y
)
85 SDL2_DEPENDENCIES
+= xlib_libXScrnSaver
86 SDL2_CONF_OPTS
+= --enable-video-x11-scrnsaver
88 SDL2_CONF_OPTS
+= --disable-video-x11-scrnsaver
91 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM
),y
)
92 SDL2_DEPENDENCIES
+= xlib_libXxf86vm
93 SDL2_CONF_OPTS
+= --enable-video-x11-vm
95 SDL2_CONF_OPTS
+= --disable-video-x11-vm
99 SDL2_CONF_OPTS
+= --disable-video-x11
--without-x
102 ifeq ($(BR2_PACKAGE_TSLIB
),y
)
103 SDL2_DEPENDENCIES
+= tslib
104 SDL2_CONF_OPTS
+= --enable-input-tslib
106 SDL2_CONF_OPTS
+= --disable-input-tslib
109 ifeq ($(BR2_PACKAGE_ALSA_LIB
),y
)
110 SDL2_DEPENDENCIES
+= alsa-lib
111 SDL2_CONF_OPTS
+= --enable-alsa
113 SDL2_CONF_OPTS
+= --disable-alsa
116 $(eval
$(autotools-package
))