2 // vim: set syntax=asciidoc:
7 First of all, create a directory and Makefile under the +package+
8 directory for your software, for example +libfoo+:
11 $ make newpackage PKG=libfoo VER=0.1
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.
37 ** variable used PKG_ARCH_DEPENDS
38 ** allowed values are: arm, mips, .. see target/arch.lst
41 ** variable used PKG_SYSTEM_DEPENDS
42 ** for allowed values see the output of: find target/*/systems -type f |grep -v toolchain
45 ** variable used PKG_LIBC_DEPENDS
46 ** allowed values are: uclibc-ng uclibc glibc musl
49 ** variable used PKG_HOST_DEPENDS
50 ** allowed values are: linux darwin cygwin freebsd netbsd openbsd
53 ** variable used PKG_NEED_CXX
54 ** Comment string: `C++`
56 Further formatting details: see xref:writing-rules-mk[the writing