Kbuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Makefile for busybox
  2. #
  3. # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
  4. #
  5. # Licensed under the GPL v2, see the file LICENSE in this tarball.
  6. obj-y :=
  7. obj-y += applets.o
  8. hostprogs-y:=
  9. hostprogs-y += usage applet_tables
  10. always:= $(hostprogs-y)
  11. # Generated files need additional love
  12. # This trick decreases amount of rebuilds
  13. # if tree is merely renamed/copied
  14. ifeq ($(srctree),$(objtree))
  15. srctree_slash =
  16. else
  17. srctree_slash = $(srctree)/
  18. endif
  19. HOSTCFLAGS_usage.o = -I$(srctree_slash)include
  20. applets/applets.o: include/usage_compressed.h include/applet_tables.h
  21. applets/usage: .config $(srctree_slash)applets/usage_compressed
  22. applets/applet_tables: .config
  23. quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
  24. cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
  25. include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
  26. $(call cmd,gen_usage_compressed)
  27. quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
  28. cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h
  29. include/applet_tables.h: applets/applet_tables
  30. $(call cmd,gen_applet_tables)