4 * Porting To A New Platform
6 The
first thing you have to
do when porting to
a new platform, is look at
7 include/SDL_platform.h and create an entry there
for your operating system.
8 The standard
format is
"__PLATFORM__", where PLATFORM is the
name of the OS.
9 Ideally SDL_platform.h will be able to
auto-detect the system it
's building
10 on based on C preprocessor symbols.
12 There are two basic ways of building SDL at the moment:
14 1. The "UNIX" way: ./configure; make; make install
16 If you have a GNUish system, then you might try this. Edit configure.in,
17 take a look at the large section labelled:
19 "Set up the configuration based on the host platform!"
21 Add a section for your platform, and then re-run autogen.sh and build!
25 If you're
using an IDE or other non-configure build system, you
'll probably
26 want to create a custom SDL_config.h for your platform. Edit SDL_config.h,
27 add a section for your platform, and create a custom SDL_config_{platform}.h,
28 based on SDL_config_minimal.h and SDL_config.h.in
30 Add the top level include directory to the header search path, and then add
31 the following sources to the project:
43 src/render/software/*.c
50 src/filesystem/dummy/*.c
53 src/joystick/dummy/*.c
55 src/thread/generic/*.c
60 Once you have a working library without any drivers, you can go back to each
61 of the major subsystems and start implementing drivers for your platform.
63 If you have any questions, don't hesitate to ask on the SDL mailing list:
67 Sam Lantinga (slouken@libsdl.org)
GLuint const GLchar * name
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLboolean GLboolean GLboolean GLboolean a