parent
42222f05de
commit
189c356fcb
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* This file is part of MXE.
|
||||
* See index.html for further information.
|
||||
*/
|
||||
|
||||
#include <SDL_net.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1;
|
||||
if (SDLNet_Init() < 0) return 1;
|
||||
|
||||
SDLNet_Quit();
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
# This file is part of MXE.
|
||||
# See index.html for further information.
|
||||
|
||||
PKG := sdl2_net
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_CHECKSUM := 15ba4f41d05cbc05ae26b217965db6bf30cf8c60
|
||||
$(PKG)_SUBDIR := SDL2_net-$($(PKG)_VERSION)
|
||||
$(PKG)_FILE := SDL2_net-$($(PKG)_VERSION).tar.gz
|
||||
#$(PKG)_URL := http://www.libsdl.org/projects/SDL_net/release/$($(PKG)_FILE)
|
||||
$(PKG)_URL := http://www.libsdl.org/tmp/SDL_net/release/$($(PKG)_FILE)
|
||||
$(PKG)_DEPS := gcc sdl
|
||||
|
||||
define $(PKG)_UPDATE
|
||||
$(WGET) -q -O- 'http://www.libsdl.org/projects/SDL_net/release/?C=M;O=D' | \
|
||||
$(SED) -n 's,.*SDL_net-\([0-9][^>]*\)\.tar.*,\1,p' | \
|
||||
head -1
|
||||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(1)' && ./configure \
|
||||
--host='$(TARGET)' \
|
||||
--disable-shared \
|
||||
--prefix='$(PREFIX)/$(TARGET)' \
|
||||
--with-sdl-prefix='$(PREFIX)/$(TARGET)' \
|
||||
--disable-sdltest \
|
||||
--disable-gui
|
||||
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
|
||||
|
||||
'$(TARGET)-gcc' \
|
||||
-W -Wall -Werror -ansi -pedantic \
|
||||
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_net.exe' \
|
||||
`'$(TARGET)-pkg-config' SDL2_net --cflags --libs`
|
||||
endef
|
Loading…
Reference in new issue