docs/README-porting.md
changeset 10153 2abd425e41dc
parent 9824 d5a7d25c5b22
child 10941 e42332dd9f4e
equal deleted inserted replaced
10152:4960666f31ac 10153:2abd425e41dc
     3 
     3 
     4 * Porting To A New Platform
     4 * Porting To A New Platform
     5 
     5 
     6   The first thing you have to do when porting to a new platform, is look at
     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.
     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.
     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
     9 Ideally SDL_platform.h will be able to auto-detect the system it's building
    10 on based on C preprocessor symbols.
    10 on based on C preprocessor symbols.
    11 
    11 
    12 There are two basic ways of building SDL at the moment:
    12 There are two basic ways of building SDL at the moment:
    13 
    13 
    14 1. The "UNIX" way:  ./configure; make; make install
    14 1. The "UNIX" way:  ./configure; make; make install
    15 
    15 
    16    If you have a GNUish system, then you might try this.  Edit configure.in,
    16    If you have a GNUish system, then you might try this.  Edit configure.in,
    17    take a look at the large section labelled:
    17    take a look at the large section labelled:
       
    18 
    18 	"Set up the configuration based on the host platform!"
    19 	"Set up the configuration based on the host platform!"
       
    20 
    19    Add a section for your platform, and then re-run autogen.sh and build!
    21    Add a section for your platform, and then re-run autogen.sh and build!
    20 
    22 
    21 2. Using an IDE:
    23 2. Using an IDE:
    22 
    24 
    23    If you're using an IDE or other non-configure build system, you'll probably
    25    If you're using an IDE or other non-configure build system, you'll probably
    25    add a section for your platform, and create a custom SDL_config_{platform}.h,
    27    add a section for your platform, and create a custom SDL_config_{platform}.h,
    26    based on SDL_config.h.minimal and SDL_config.h.in
    28    based on SDL_config.h.minimal and SDL_config.h.in
    27 
    29 
    28    Add the top level include directory to the header search path, and then add
    30    Add the top level include directory to the header search path, and then add
    29    the following sources to the project:
    31    the following sources to the project:
       
    32 
    30 	src/*.c
    33 	src/*.c
    31 	src/atomic/*.c
    34 	src/atomic/*.c
    32 	src/audio/*.c
    35 	src/audio/*.c
    33 	src/cpuinfo/*.c
    36 	src/cpuinfo/*.c
    34 	src/events/*.c
    37 	src/events/*.c