diff options
author | wsnipex <wsnipex@a1.net> | 2014-09-12 10:19:48 +0200 |
---|---|---|
committer | Frank Raeznberg <frank@zzattack.org> | 2014-10-26 23:22:48 +0100 |
commit | d0bff57b4212754db3beb6cb3c06730fca3b4a0e (patch) | |
tree | fde6fbd0a1d7c4813151baf22c12d1f189a70f0d | |
parent | 6b74885e9331e2f570ea7a555518e03cded9537c (diff) |
[depends] move to SDL2 for linux
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | tools/depends/target/Makefile | 4 | ||||
-rw-r--r-- | tools/depends/target/libsdl2/Makefile | 41 |
3 files changed, 45 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 5f7de64e67..f72ea4d15d 100644 --- a/configure.in +++ b/configure.in @@ -1199,7 +1199,7 @@ AC_SEARCH_LIBS([__dn_expand],resolv) # platform dependent libraries if test "$host_vendor" = "apple" ; then if test "$use_arch" != "arm"; then - AC_CHECK_LIB([SDL2], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([SDL], [main],, AC_MSG_ERROR($missing_library)) AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"]) AC_DEFINE([SDL_VERSION],[1],["SDL major version"]) fi @@ -2090,7 +2090,7 @@ fi if test "$use_joystick" = "yes"; then final_message="$final_message\n Joystick:\tYes" - SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK" + AC_DEFINE([HAS_SDL_JOYSTICK],[1],["Define to 1 if using SDL joystick"]) else final_message="$final_message\n Joystick:\tNo" fi diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index 73a939cde8..d9527daf21 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -58,7 +58,7 @@ LINUX_SYSTEM_LIBS= ifeq ($(OS),linux) #not for raspberry pi ifneq ($(TARGET_PLATFORM),raspberry-pi) - DEPENDS += libsdl linux-system-libs + DEPENDS += libsdl2 linux-system-libs LINUX_SYSTEM_LIBS = linux-system-libs endif DEPENDS += alsa-lib @@ -98,7 +98,7 @@ openssl: $(ZLIB) gnutls: nettle $(ZLIB) nettle: gmp pythonmodule-pil: $(ZLIB) libjpeg-turbo libpng freetype2 python26 -libsdl: $(LINUX_SYSTEM_LIBS) +libsdl2: $(LINUX_SYSTEM_LIBS) libxslt: libgcrypt ffmpeg: $(ICONV) $(ZLIB) bzip2 libvorbis $(FFMPEG_DEPENDS) diff --git a/tools/depends/target/libsdl2/Makefile b/tools/depends/target/libsdl2/Makefile new file mode 100644 index 0000000000..6c6eb5a26a --- /dev/null +++ b/tools/depends/target/libsdl2/Makefile @@ -0,0 +1,41 @@ +include ../../Makefile.include +DEPS= ../../Makefile.include Makefile + +# lib name, version +LIBNAME=SDL2 +VERSION=2.0.3 +SOURCE=$(LIBNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.gz + +# configuration settings +CONFIGURE=./configure --prefix=$(PREFIX) --disable-video-directfb +ifneq ($(OS),linux) +CONFIGURE += --without-x --disable-video-x11 +endif + +LIBDYLIB=$(PLATFORM)/build/.libs/lib$(LIBNAME).a + +all: .installed-$(PLATFORM) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) + rm -rf $(PLATFORM); mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); ./autogen.sh + cd $(PLATFORM); $(CONFIGURE) + +$(LIBDYLIB): $(PLATFORM) + $(MAKE) -C $(PLATFORM) + +.installed-$(PLATFORM): $(LIBDYLIB) + $(MAKE) -C $(PLATFORM) install + touch $@ + +clean: + $(MAKE) -C $(PLATFORM) clean + rm -f .installed-$(PLATFORM) + +distclean:: + rm -rf $(PLATFORM) .installed-$(PLATFORM) |