xenomai: new package, only mercury for now supported
[openadk.git] / docs / adding-packages-directory.txt
blob227107a89414448ff07958b07041d01d6f82143d
1 // -*- mode:doc; -*-
2 // vim: set syntax=asciidoc:
4 New package
5 ~~~~~~~~~~~
7 First of all, create a directory and Makefile under the +package+
8 directory for your software, for example +libfoo+:
10 ------------
11  $ make newpackage PKG=libfoo VER=0.1
12 ------------
14 This will create a sample Makefile for you, with a lot of comments and
15 hints.  It describes how the package should be downloaded, configured,
16 built, installed, etc.
18 Depending on the package type, the +Makefile+ must be written in a
19 different way, using two different infrastructures:
21 * manual package configuration
23 * automatic package configuration using autotools
26 [[dependencies-target-toolchain-options]]
27 Dependencies on target and toolchain options
29 Some packages depend on certain options of the toolchain: mainly the
30 choice of C library and C++ support.  Some packages can only be built on
31 certain target architectures or for specific target systems. 
33 These dependencies have to be expressed in the Makefile. The given values
34 are space separated and can be negated with ! as a prefix.
36 * Target architecture
37 ** variable used PKG_ARCH_DEPENDS
38 ** allowed values are: arm, mips, .. see target/arch.lst
40 * Target system 
41 ** variable used PKG_SYSTEM_DEPENDS
42 ** for allowed values see the output of: find target/*/systems -type f
44 * Target C library
45 ** variable used PKG_LIBC_DEPENDS
46 ** allowed values are: uclibc-ng glibc musl
48 * Host system
49 ** variable used PKG_HOST_DEPENDS
50 ** allowed values are: linux darwin cygwin freebsd netbsd openbsd
52 * Special support needed (Toolchain with Threads, Realtime or C++ enabled)
53 ** variable used PKG_NEEDS
54 ** allowed values are: threads rt c++
56 Further formatting details: see xref:writing-rules-mk[the writing
57 rules].