1
0

adding-packages-directory.txt 1.6 KB

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