The RTL source tree is divided in many subdirectories, but is very structured and easy to understand. It mainly consists of three parts:
A OS-dependent directory. This contains the files that are different for each operating system. When compiling the RTL, you should do it here. The following directories exist:
amiga For the Amiga.
atari For the Atari.
beos For BeOS. It has one subdirectory for each of the supported processors.
bsd Common files for the various BSD platforms.
darwin For the unix-compatibility layer on Mac OS.
embedded A template for embedded targets.
emx OS/2 using the EMX extender.
freebsd For the FreeBSD platform.
gba Game Boy Advanced.
go32v2 For dos, using the GO32v2 extender.
linux For linux platforms. It has one subdirectory for each of the supported processors.
macos For the Mac OS platform.
morphos For the MorphOS platform.
nds For the Nintendo DS platform.
netbsd For NetBSD platforms. It has one subdirectory for each of the supported processors.
netware For the Novell netware platform.
netwlibc For the Novell netware platform using the C library.
openbsd For the OpenBSD platform.
os2 for os/2.
palmos For the PalmOS Dragonball processor based platform.
posix For posix interfaces (used for easier porting).
solaris For the Solaris platform. It has one subdirectory for each of the supported processors.
symbian For the symbian mobile phone OS.
qnx For the QNX Realtime platform.
unix For unix common interfaces (used for easier porting).
win32 For Windows 32-bit platforms.
win64 For Windows 64-bit platforms.
wince For the Windows CE embedded platform (arm CPU).
posix For posix interfaces (used for easier porting).
A processor dependent directory. This contains files that are system independent, but processor dependent. It contains mostly optimized routines for a specific processor. The following directories exist:
arm For the ARM series of processors.
i386 For the Intel 80x86 series of processors.
m68k For the Motorola 680x0 series of processors.
powerpc For the PowerPC processor.
powerpc64 For the PowerPC 64-bit processor.
sparc For the SUN SPARC processor.
x86_64 For Intel compatible 64-bit processors such as the AMD64.
An OS-independent and Processor independent directory: inc. This contains complete units, and include files containing interface parts of units as well as generic versions of processor specific routines.
The Object Pascal extensions (mainly Delphi compatibility units) are in the objpas directory. The sysutils and classes units are in separate subdirectories of the objpas directory.