blob: 020605275d2141f3333b6916b516b59b4847c526 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// -*- mode:doc; -*-
// vim: set syntax=asciidoc:
New package
~~~~~~~~~~~
First of all, create a directory and Makefile under the +package+
directory for your software, for example +libfoo+:
------------
$ make newpackage PKG=libfoo VER=0.1
------------
This will create a sample Makefile for you, with a lot of comments and
hints. It describes how the package should be downloaded, configured,
built, installed, etc.
Depending on the package type, the +Makefile+ must be written in a
different way, using two different infrastructures:
* manual package configuration
* automatic package configuration using autotools
[[dependencies-target-toolchain-options]]
Dependencies on target and toolchain options
Some packages depend on certain options of the toolchain: mainly the
choice of C library and C++ support. Some packages can only be built on
certain target architectures or for specific target systems.
These dependencies have to be expressed in the Makefile. The given values
are space separated and can be negated with ! as a prefix.
* Target architecture
** variable used PKG_ARCH_DEPENDS
** allowed values are: arm, mips, .. see target/arch.lst
* Target system
** variable used PKG_SYSTEM_DEPENDS
** for allowed values see the output of: find target/*/systems -type f |grep -v toolchain
* Target C library
** variable used PKG_LIBC_DEPENDS
** allowed values are: uclibc-ng glibc musl
* Host system
** variable used PKG_HOST_DEPENDS
** allowed values are: linux darwin cygwin freebsd netbsd openbsd
* C++ support
** variable used PKG_NEED_CXX
** Comment string: `C++`
Further formatting details: see xref:writing-rules-mk[the writing
rules].
|