Kbuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # DO NOT EDIT. This file is generated from Kbuild.src
  2. # Makefile for busybox
  3. #
  4. # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
  5. #
  6. # Licensed under GPLv2, see file LICENSE in this source tree.
  7. obj-y :=
  8. obj-y += applets.o
  9. hostprogs-y:=
  10. hostprogs-y += usage usage_pod applet_tables
  11. always:= $(hostprogs-y)
  12. # Generated files need additional love
  13. # This trick decreases amount of rebuilds
  14. # if tree is merely renamed/copied
  15. ifeq ($(srctree),$(objtree))
  16. srctree_slash =
  17. else
  18. srctree_slash = $(srctree)/
  19. endif
  20. HOSTCFLAGS_usage.o = -I$(srctree_slash)include -Iinclude
  21. HOSTCFLAGS_usage_pod.o = -I$(srctree_slash)include -Iinclude
  22. applets/applets.o: include/usage_compressed.h include/applet_tables.h
  23. applets/applet_tables: .config include/applets.h
  24. applets/usage: .config include/applets.h
  25. applets/usage_pod: .config include/applets.h include/applet_tables.h
  26. quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
  27. cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
  28. include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
  29. $(call cmd,gen_usage_compressed)
  30. quiet_cmd_gen_applet_tables = GEN include/applet_tables.h include/NUM_APPLETS.h
  31. cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
  32. include/NUM_APPLETS.h: applets/applet_tables
  33. $(call cmd,gen_applet_tables)
  34. # In fact, include/applet_tables.h depends only on applets/applet_tables,
  35. # and is generated by it. But specifying only it can run
  36. # applets/applet_tables twice, possibly in parallel.
  37. # We say that it also needs NUM_APPLETS.h
  38. #
  39. # Unfortunately, we need to list the same command,
  40. # and it can be executed twice (sequentially).
  41. # The alternative is to not list any command,
  42. # and then if include/applet_tables.h is deleted, it won't be rebuilt.
  43. #
  44. include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
  45. $(call cmd,gen_applet_tables)