jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.6KB

  1. /*
  2. * This file documents the process of porting JACK to new platforms.
  3. * It is part of the JACK reference manual, built using doxygen.
  4. */
  5. /**
  6. @page porting-guide Porting JACK
  7. The @ref index is designed to be portable to any system supporting the
  8. relevant POSIX and C language standards. It currently works with
  9. GNU/Linux and Mac OS X on several different processor architectures.
  10. This document describes the steps needed to port JACK to another
  11. platform, and the methods used to provide portability.
  12. - @ref portrequirements
  13. - @ref portoverview
  14. - @ref portopsys
  15. - @ref portcpu
  16. - @ref portissues
  17. @section portrequirements Requirements
  18. - Each platform should build directly from CVS or from a tarball
  19. using the GNU @c ./configure tools. Platform-specific toolsets can
  20. by used for development, but the GNU tools should at least work for
  21. basic distribution and configuration.
  22. - For long-term maintainability we want to minimize the use of
  23. conditional compilation in source files.
  24. - We should provide generic versions of all system-dependent
  25. headers, so platforms need only provide those they modify.
  26. - In some cases, operating system-specific information must be able
  27. to override processor-specific data.
  28. @section portoverview Overview
  29. JACK relies on two types of platform-specific headers:
  30. - @ref portopsys
  31. - @ref portcpu
  32. OS-specific headers take precedence over CPU-specific headers.
  33. The JACK @c configure.host script and its system-dependent header
  34. directories were adapted from the @c libstdc++-v3 component of the GNU
  35. Compiler Collective, <http://gcc.gnu.org>.
  36. @section portlang C Language Dependencies
  37. JACK is written to conform with C99, as defined in International
  38. Standard ISO/IEC 9899:1999. Because many existing compilers do not
  39. fully support this standard, some new features should be avoided for
  40. portablility reasons. For example, variables should not be declared
  41. in the middle of a compound statement, because many compilers still
  42. cannot handle that language extension.
  43. @section portopsys Operating System Dependencies
  44. JACK is written for a POSIX environment compliant with IEEE Std
  45. 1003.1-2001, ISO/IEC 9945:2003, including the POSIX Threads Extension
  46. (1003.1c-1995) and the Realtime and Realtime Threads feature groups.
  47. When some needed POSIX feature is missing on a platform, the preferred
  48. solution is to provide a substitute, as with the @c fakepoll.c
  49. implementation for Mac OS X.
  50. Whenever possible, OS dependencies should be auto-detected by @c
  51. configure. Sometimes they can be isolated in OS-specific header
  52. files, found in subdirectories of @c config/os and referenced with a
  53. @c <sysdeps/xxx.h> name.
  54. If conditional compilation must be used in mainline
  55. platform-independent code, avoid using the system name. Instead, @c
  56. \#define a descriptive name in @c <config.h>, and test it like this:
  57. @code
  58. \#ifdef JACK_USE_MACH_THREADS
  59. allocate_mach_serverport(engine, client);
  60. client->running = FALSE;
  61. \#endif
  62. @endcode
  63. Be sure to place any generic implementation alternative in the @c
  64. \#else or use an @c \#ifndef, so no other code needs to know your
  65. conditional labels.
  66. @section portissues Issues Not Addressed
  67. - Cross-compilation has not been tested, or even thought through in
  68. much detail. The @a host is the system on which JACK will run.
  69. This may differ from the @a build system doing the compilation.
  70. These are selected using the standard @c ./configure options @c
  71. --host and @c --build. Usually, @c ./config.guess can print the
  72. appropriate canonical name for any system on which it runs.
  73. - Platform-specific build tools like Apple's Project Builder are not
  74. well-supported.
  75. */