From e15e6b91f30f7f9bae32bffef947cce40774f760 Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Sat, 6 Mar 2010 14:15:07 +0100 Subject: test program for package sdl_net --- src/sdl_net-test.c | 17 +++++++++++++++++ src/sdl_net.mk | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 src/sdl_net-test.c diff --git a/src/sdl_net-test.c b/src/sdl_net-test.c new file mode 100644 index 0000000..8a4b40c --- /dev/null +++ b/src/sdl_net-test.c @@ -0,0 +1,17 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include + +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; +} diff --git a/src/sdl_net.mk b/src/sdl_net.mk index 59aba70..eecb29d 100644 --- a/src/sdl_net.mk +++ b/src/sdl_net.mk @@ -28,4 +28,9 @@ define $(PKG)_BUILD --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-sdl_net.exe' \ + `'$(TARGET)-pkg-config' sdl --cflags --libs` -lSDL_net -lws2_32 endef -- cgit v0.12