slouken@1484: slouken@1484: * Porting To A New Platform slouken@1484: slouken@1484: The first thing you have to do when porting to a new platform, is look at slouken@1484: include/SDL_platform.h and create an entry there for your operating system. slouken@1484: The standard format is __PLATFORM__, where PLATFORM is the name of the OS. slouken@1484: Ideally SDL_platform.h will be able to auto-detect the system it's building slouken@1484: on based on C preprocessor symbols. slouken@1484: slouken@1484: There are two basic ways of building SDL at the moment: slouken@1484: slouken@1484: 1. The "UNIX" way: ./configure; make; make install slouken@1484: slouken@1484: If you have a GNUish system, then you might try this. Edit configure.in, slouken@1484: take a look at the large section labelled: slouken@1484: "Set up the configuration based on the target platform!" slouken@1484: Add a section for your platform, and then re-run autogen.sh and build! slouken@1484: slouken@1484: 2. Using an IDE: slouken@1484: slouken@1484: If you're using an IDE or other non-configure build system, you'll probably slouken@1484: want to create a custom SDL_config.h for your platform. Edit SDL_config.h, slouken@1484: add a section for your platform, and create a custom SDL_config_{platform}.h, slouken@1484: based on SDL_config.h.minimal and SDL_config.h.in slouken@1484: slouken@1484: Add the top level include directory to the header search path, and then add slouken@1484: the following sources to the project: slouken@1484: src/*.c slouken@1484: src/audio/*.c slouken@1484: src/cdrom/*.c slouken@1484: src/cpuinfo/*.c slouken@1484: src/events/*.c slouken@1484: src/file/*.c slouken@1484: src/joystick/*.c slouken@1484: src/stdlib/*.c slouken@1484: src/thread/*.c slouken@1484: src/timer/*.c slouken@1484: src/video/*.c slouken@1484: src/audio/disk/*.c slouken@1946: src/audio/dummy/*.c slouken@1484: src/video/dummy/*.c slouken@1484: src/joystick/dummy/*.c slouken@1484: src/cdrom/dummy/*.c slouken@1484: src/thread/generic/*.c slouken@1484: src/timer/dummy/*.c slouken@1484: src/loadso/dummy/*.c slouken@1484: slouken@1484: slouken@1484: Once you have a working library without any drivers, you can go back to each slouken@1484: of the major subsystems and start implementing drivers for your platform. slouken@1484: slouken@1484: If you have any questions, don't hesitate to ask on the SDL mailing list: slouken@1484: http://www.libsdl.org/mailing-list.php slouken@1484: slouken@1484: Enjoy! slouken@1484: Sam Lantinga (slouken@libsdl.org) slouken@1484: