mxe/src/sdl2.mk

34 lines
1.3 KiB
Makefile
Raw Normal View History

2013-07-27 09:46:58 +01:00
# This file is part of MXE.
# See index.html for further information.
PKG := sdl2
$(PKG)_IGNORE :=
2014-03-10 06:02:17 +00:00
$(PKG)_VERSION := 2.0.2
$(PKG)_CHECKSUM := 304c7cd3dddca98724a3e162f232a8a8f6e1ceb3
2013-07-27 09:46:58 +01:00
$(PKG)_SUBDIR := SDL2-$($(PKG)_VERSION)
$(PKG)_FILE := SDL2-$($(PKG)_VERSION).tar.gz
2013-08-12 17:37:15 +01:00
$(PKG)_URL := http://www.libsdl.org/release/$($(PKG)_FILE)
2013-07-27 09:46:58 +01:00
$(PKG)_DEPS := gcc libiconv
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://hg.libsdl.org/SDL/tags' | \
$(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
$(SED) -i 's,-mwindows,-lwinmm -mwindows,' '$(1)/configure'
cd '$(1)' && aclocal -I acinclude && autoconf && ./configure \
2013-07-27 09:46:58 +01:00
--host='$(TARGET)' \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-threads \
--enable-directx
$(SED) -i 's,defined(__MINGW64_VERSION_MAJOR),defined(__MINGW64_VERSION_MAJOR) \&\& defined(_WIN64),' '$(1)/include/SDL_cpuinfo.h'
$(SED) -i 's,-XCClinker,,' '$(1)/sdl2.pc'
$(SED) -i 's,-XCClinker,,' '$(1)/sdl2-config'
$(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
ln -sf '$(PREFIX)/$(TARGET)/bin/sdl2-config' '$(PREFIX)/bin/$(TARGET)-sdl2-config'
endef