diff --git a/include/SDL/SDL_config.h b/include/SDL/SDL_config.h new file mode 100644 index 0000000..0c784ac --- /dev/null +++ b/include/SDL/SDL_config.h @@ -0,0 +1,37 @@ +/* + * \brief Simply use Genode + * \author Stefan Kalkowski + * \date 2008-12-12 + */ + +/* + * Copyright (c) <2008> Stefan Kalkowski + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +#ifndef _SDL_config_h +#define _SDL_config_h + +#include +#include "SDL_config_genode.h" + +#endif /* _SDL_config_h */ diff --git a/include/SDL/SDL_config_genode.h b/include/SDL/SDL_config_genode.h new file mode 100644 index 0000000..d1d21fa --- /dev/null +++ b/include/SDL/SDL_config_genode.h @@ -0,0 +1,87 @@ +/* + * \brief Genode specific defines + * \author Stefan Kalkowski + * \date 2008-12-12 + */ + +/* + * Copyright (c) <2008> Stefan Kalkowski + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +#ifndef _SDL_config_genode_h +#define _SDL_config_genode_h + +/* libC includes */ +#include +#include +#include +#include +#include + +/* Enable the Genode audio driver */ +#define SDL_AUDIO_DRIVER_GENODE 1 + +/* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */ +#define SDL_CDROM_DUMMY 1 + +/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ +#define SDL_JOYSTICK_DISABLED 1 + +/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ +#define SDL_LOADSO_DISABLED 0 + +/* Enable thread support */ +#define SDL_THREAD_PTHREAD 1 + +/* Enable timer support */ +#define SDL_TIMER_UNIX 1 + +/* Enable video drivers */ +#define SDL_VIDEO_DRIVER_GENODE_FB 1 + +#define SDL_VIDEO_OPENGL 1 + +/* #define HAVE_MREMAP 0 */ +#define HAVE_MALLOC +#define HAVE_CALLOC +#define HAVE_REALLOC +#define HAVE_FREE +#define HAVE_QSORT +#define HAVE_MEMSET +#define HAVE_MEMCMP +#define HAVE_STRLEN +#define HAVE_STRLCPY +#define HAVE_STRLCAT +#define HAVE_STRNCMP +#define HAVE_STRNCASECMP +#define HAVE_SNPRINTF +#define HAVE_VSNPRINTF + +#define HAVE_STDIO_H 1 + +/* #define SDL_malloc malloc */ +/* #define SDL_calloc calloc */ +/* #define SDL_realloc realloc */ +/* #define SDL_free free */ + +#endif /* _SDL_config_genode_h */ diff --git a/recipes/api/sdl/content.mk b/recipes/api/sdl/content.mk index 1e61fc8..d9d5057 100644 --- a/recipes/api/sdl/content.mk +++ b/recipes/api/sdl/content.mk @@ -1,13 +1,19 @@ MIRROR_FROM_REP_DIR := lib/symbols/sdl lib/import/import-sdl.mk \ - lib/mk/mesa_api.mk lib/mk/sdlmain.mk + lib/mk/sdlmain.mk -content: $(MIRROR_FROM_REP_DIR) src/lib/sdl include LICENSE +MIRROR_FROM_LIBPORTS := lib/mk/mesa_api.mk + +content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_LIBPORTS) src/lib/sdl include LICENSE $(MIRROR_FROM_REP_DIR): $(mirror_from_rep_dir) +$(MIRROR_FROM_LIBPORTS): + mkdir -p $(dir $@) + cp $(GENODE_DIR)/repos/libports/$@ $@ + SDL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/sdl) -MESA_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/mesa) +MESA_PORT_DIR := $(call port_dir,$(GENODE_DIR)/repos/libports/ports/mesa) # # The Mesa header files needed for SDL_OpenGL are copied as well. @@ -17,7 +23,7 @@ include: cp -r $(SDL_PORT_DIR)/include/SDL $@/ cp -r $(REP_DIR)/include/SDL $@/ cp -r $(MESA_PORT_DIR)/include/* $@/ - cp -r $(REP_DIR)/include/EGL $@/ + cp -r $(GENODE_DIR)/repos/libports/include/EGL $@/ src/lib/sdl: mkdir -p $@