test program for package sdl_net

This commit is contained in:
Volker Grabsch 2010-03-06 14:15:07 +01:00
parent 7faf8a1c89
commit e15e6b91f3
2 changed files with 22 additions and 0 deletions

17
src/sdl_net-test.c Normal file
View File

@ -0,0 +1,17 @@
/* This file is part of mingw-cross-env. */
/* See doc/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;
}

View File

@ -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