diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sdl-test.c | 19 | ||||
-rw-r--r-- | src/sdl.mk | 5 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/sdl-test.c b/src/sdl-test.c new file mode 100644 index 0000000..2e205e5 --- /dev/null +++ b/src/sdl-test.c @@ -0,0 +1,19 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html or doc/README for further information. */ + +#include <SDL.h> + +int main(int argc, char* argv[]) +{ + SDL_Surface *screen; + + (void)argc; + (void)argv; + + if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1; + + screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE); + + SDL_Quit(); + return 0; +} @@ -28,4 +28,9 @@ define $(PKG)_BUILD --prefix='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + `'$(TARGET)-pkg-config' sdl --cflags --static --libs` \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl.exe' endef |