docs/develop: add sourcetree layout document

Largely based on a_brief_introduction_to_our_source_repository_layout.html
from the website, revised and updated. I will delete the one from the
website and put a redirect to here once this is merged.

Change-Id: I06657bbea4c16df7bff1f2357cffd2ec8a63c65a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7236
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
PulkoMandy 2023-12-23 10:44:10 +01:00 committed by waddlesplash
parent 0b3890fea1
commit e92b4d3a27

View File

@ -24,6 +24,69 @@ Sending change reviews
* https://dev.haiku-os.org/wiki/CodingGuidelines/SubmittingPatches
* https://review.haiku-os.org/Documentation/user-upload.html
Source tree organization
------------------------
The source tree is organized so you can easily find what you look for. If you're already familiar
with Haiku, you will notice that the source directory generally mirrors the way the filesystem in
Haiku is organized.
At the top level, things that need to be "built" in some way are put in the ``src`` directory.
For example, the "data" folder at the root contains files that are used as-is in the disk image,
while "src/data" contain files that need to be compild or converted to different formats, such as
the MIME database.
* src - All files that have to be built
* add-ons - Everything that will be installed to /boot/system/add-ons: kernel drivers, media codecs, translators, …
* apps - GUI applications that are not preferences
* bin - Command-line applications
* build - Files to allow using the Haiku buildtools on non-Haiku platforms
* data - Data files of any type: icons, MIME database, …
* kits - The public C++ API of Haiku: libbe, libmedia, libgame, …
* libs - Static and shared libraries used by Haiku applications
* preferences - The preference applications
* servers - The system servers: app_server, input_server, net_server, …
* system - The low-level system that makes Haiku tick
* boot - The bootloaders for all supported platforms
* glue - The "glue code" that makes shared libraries execute their constructors and destructors, and programs start their execution at ``main()``
* kernel - The kernel and all of its core services
* ldscripts - Linker scripts for building various parts of Haiku
* libnetwork - Files for building libnetwork.so, including the POSIX/BSD socket implementation and some extensions to it, as well as the DNS resolver
* libroot - Files for building libroot.so, including the standard C and POSIX library implementation
* runtime_loader: The special application that knows how to load and run other applications from ELF executable files
* tests - This more or less mirrors the main source tree layout, and contains tests and debugging tools for each component. Some of the tests are run using cppunit, other can be run manually.
* tools - Tools that can be built on non-Haiku platforms. Either needed for compiling Haiku itself, or otherwise useful outside of Haiku
* headers - All shared, private and public headers
* build - Compatibility headers for building Haiku code on non-Haiku systems
* compatibility - Compatbility layers allowing to build BSD and GNU code to run on Haiku
* config - Platform-specific configuration, definition of standard types that can be used in other places
* cpp - The C++ standard library headers (only for gcc2, for later gcc versions this is provided by the gcc package)
* glibc - Headers from glibc, for configuration and definition of some glibc specific functions
* libs - Headers for the libraries found in src/libs
* os - The public headers that define the Haiku API
* posix - The POSIX APIs supported by Haiku
* private - Private headers that are shared between haiku components, including work-in-progress APIs that may become public in the future
* tools - Headers for various tools and utilities
* docs - Documentation
* develop - Internal documentation for developers working on Haiku itself (this is what you are reading now)
* user - `API reference <https://api.haiku-os.org>`
* Some other miscellaneous documentation
* build - Build files
* jam - Jam rules used by the Haiku build, defining how to build an application, a library, a disk image, …
* config_headers - Configurable headers for enabling various debug features
* scripts - Various scripts used by the Haiku build process
* 3rd_party - Developers custom files. Used for various side projects from Haiku developers, useful personal scripts, and integration with other tools and projects such as virtualization software
Managing GCC and binutils updates using vendor branches
-------------------------------------------------------