blob: a966f6e5b3c5abc8953567cfb09b9a48eefa8909 [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:=
Denys Vlasenkoacabf8f2009-10-02 01:10:32 +020011hostprogs-y += usage usage_pod 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
Denys Vlasenkoacabf8f2009-10-02 01:10:32 +020025HOSTCFLAGS_usage.o = -I$(srctree_slash)include -Iinclude
26HOSTCFLAGS_usage_pod.o = -I$(srctree_slash)include -Iinclude
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 Vlasenko2afabe82007-12-10 07:06:04 +000030applets/applet_tables: .config
Denys Vlasenkoacabf8f2009-10-02 01:10:32 +020031applets/usage: .config
32applets/usage_pod: .config include/applet_tables.h
Denis Vlasenko745cd172007-11-29 03:31:20 +000033
34quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
Denis Vlasenkoa29c9352009-04-19 12:15:51 +000035 cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000036
Denis Vlasenkoa29c9352009-04-19 12:15:51 +000037include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
Mike Frysingere5c09532007-01-02 05:42:35 +000038 $(call cmd,gen_usage_compressed)
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000039
Denis Vlasenko745cd172007-11-29 03:31:20 +000040quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
41 cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h
42
Denis Vlasenko1aa7e472007-11-28 06:49:03 +000043include/applet_tables.h: applets/applet_tables
Denis Vlasenko745cd172007-11-29 03:31:20 +000044 $(call cmd,gen_applet_tables)