blob: 983037987c7679bf04d9ecd0f4a9e18e0934f275 [file] [log] [blame]
Denis Vlasenko7d219aa2006-10-05 10:17:08 +00001# 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
Denis Vlasenkod62fd842007-10-07 20:46:34 +00007obj-y :=
8obj-y += applets.o
Denis Vlasenko52b5eba2006-10-19 22:11:06 +00009
Denis Vlasenko432d69c2007-06-14 21:41:15 +000010hostprogs-y:=
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000011hostprogs-y += usage applet_tables
Denis Vlasenko432d69c2007-06-14 21:41:15 +000012
Denis Vlasenkod62fd842007-10-07 20:46:34 +000013always:= $(hostprogs-y)
Denis Vlasenko432d69c2007-06-14 21:41:15 +000014
15# Generated files need additional love
Denis Vlasenkob5605772006-10-19 22:12:47 +000016
Denis Vlasenkoa29c9352009-04-19 12:15:51 +000017# This trick decreases amount of rebuilds
18# if tree is merely renamed/copied
Denis Vlasenkof66fe9a2009-04-19 14:12:50 +000019ifeq ($(srctree),$(objtree))
Denis Vlasenkoa29c9352009-04-19 12:15:51 +000020srctree_slash =
21else
22srctree_slash = $(srctree)/
23endif
24
25
26HOSTCFLAGS_usage.o = -I$(srctree_slash)include
Denis Vlasenko432d69c2007-06-14 21:41:15 +000027
Denis Vlasenko745cd172007-11-29 03:31:20 +000028applets/applets.o: include/usage_compressed.h include/applet_tables.h
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000029
Denis Vlasenkoa29c9352009-04-19 12:15:51 +000030applets/usage: .config $(srctree_slash)applets/usage_compressed
Denis Vlasenko2afabe82007-12-10 07:06:04 +000031applets/applet_tables: .config
Denis Vlasenko745cd172007-11-29 03:31:20 +000032
33quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
Denis Vlasenkoa29c9352009-04-19 12:15:51 +000034 cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000035
Denis Vlasenkoa29c9352009-04-19 12:15:51 +000036include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
Mike Frysingere5c09532007-01-02 05:42:35 +000037 $(call cmd,gen_usage_compressed)
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000038
Denis Vlasenko745cd172007-11-29 03:31:20 +000039quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
40 cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h
41
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000042include/applet_tables.h: applets/applet_tables
Denis Vlasenko745cd172007-11-29 03:31:20 +000043 $(call cmd,gen_applet_tables)