blob: 50c090f8db190c028ff0fd93c666f3e599637c6b [file] [log] [blame]
Glenn L McGrath3238ea12003-02-15 10:53:40 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Glenn L McGrath3238ea12003-02-15 10:53:40 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Glenn L McGrath3238ea12003-02-15 10:53:40 +00006
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007COREUTILS_AR:=coreutils.a
8ifndef $(COREUTILS_DIR)
9COREUTILS_DIR:=$(top_builddir)/coreutils/
10endif
11srcdir=$(top_srcdir)/coreutils
Glenn L McGrath3238ea12003-02-15 10:53:40 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013COREUTILS-y:=
Mike Frysinger5b300dd2005-05-12 22:22:50 +000014COREUTILS-$(CONFIG_BASENAME) += basename.o
15COREUTILS-$(CONFIG_CAL) += cal.o
16COREUTILS-$(CONFIG_CAT) += cat.o
Rob Landley8abbee42006-05-31 19:36:04 +000017COREUTILS-$(CONFIG_CATV) += catv.o
Mike Frysinger5b300dd2005-05-12 22:22:50 +000018COREUTILS-$(CONFIG_CHGRP) += chgrp.o
19COREUTILS-$(CONFIG_CHMOD) += chmod.o
20COREUTILS-$(CONFIG_CHOWN) += chown.o
21COREUTILS-$(CONFIG_CHROOT) += chroot.o
Rob Landley856489b2006-04-18 20:57:28 +000022COREUTILS-$(CONFIG_CKSUM) += cksum.o
Mike Frysinger5b300dd2005-05-12 22:22:50 +000023COREUTILS-$(CONFIG_CMP) += cmp.o
Mike Frysingera84a5122005-05-12 22:23:15 +000024COREUTILS-$(CONFIG_COMM) += comm.o
Mike Frysinger5b300dd2005-05-12 22:22:50 +000025COREUTILS-$(CONFIG_CP) += cp.o
26COREUTILS-$(CONFIG_CUT) += cut.o
27COREUTILS-$(CONFIG_DATE) += date.o
28COREUTILS-$(CONFIG_DD) += dd.o
29COREUTILS-$(CONFIG_DF) += df.o
Bernhard Reutner-Fischer8f7d3892006-04-06 08:11:08 +000030COREUTILS-$(CONFIG_DIFF) += diff.o
Mike Frysinger5b300dd2005-05-12 22:22:50 +000031COREUTILS-$(CONFIG_DIRNAME) += dirname.o
32COREUTILS-$(CONFIG_DOS2UNIX) += dos2unix.o
33COREUTILS-$(CONFIG_DU) += du.o
34COREUTILS-$(CONFIG_ECHO) += echo.o
35COREUTILS-$(CONFIG_ENV) += env.o
36COREUTILS-$(CONFIG_EXPR) += expr.o
37COREUTILS-$(CONFIG_FALSE) += false.o
38COREUTILS-$(CONFIG_FOLD) += fold.o
39COREUTILS-$(CONFIG_HEAD) += head.o
40COREUTILS-$(CONFIG_HOSTID) += hostid.o
41COREUTILS-$(CONFIG_ID) += id.o
42COREUTILS-$(CONFIG_INSTALL) += install.o
43COREUTILS-$(CONFIG_LENGTH) += length.o
44COREUTILS-$(CONFIG_LN) += ln.o
45COREUTILS-$(CONFIG_LOGNAME) += logname.o
46COREUTILS-$(CONFIG_LS) += ls.o
47COREUTILS-$(CONFIG_MD5SUM) += md5_sha1_sum.o
48COREUTILS-$(CONFIG_MKDIR) += mkdir.o
49COREUTILS-$(CONFIG_MKFIFO) += mkfifo.o
50COREUTILS-$(CONFIG_MKNOD) += mknod.o
51COREUTILS-$(CONFIG_MV) += mv.o
52COREUTILS-$(CONFIG_NICE) += nice.o
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +000053COREUTILS-$(CONFIG_NOHUP) += nohup.o
Mike Frysinger5b300dd2005-05-12 22:22:50 +000054COREUTILS-$(CONFIG_OD) += od.o
55COREUTILS-$(CONFIG_PRINTENV) += printenv.o
56COREUTILS-$(CONFIG_PRINTF) += printf.o
57COREUTILS-$(CONFIG_PWD) += pwd.o
58COREUTILS-$(CONFIG_REALPATH) += realpath.o
59COREUTILS-$(CONFIG_RM) += rm.o
60COREUTILS-$(CONFIG_RMDIR) += rmdir.o
61COREUTILS-$(CONFIG_SEQ) += seq.o
62COREUTILS-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
63COREUTILS-$(CONFIG_SLEEP) += sleep.o
64COREUTILS-$(CONFIG_SORT) += sort.o
65COREUTILS-$(CONFIG_STAT) += stat.o
66COREUTILS-$(CONFIG_STTY) += stty.o
67COREUTILS-$(CONFIG_SUM) += sum.o
68COREUTILS-$(CONFIG_SYNC) += sync.o
69COREUTILS-$(CONFIG_TAIL) += tail.o
70COREUTILS-$(CONFIG_TEE) += tee.o
71COREUTILS-$(CONFIG_TEST) += test.o
72COREUTILS-$(CONFIG_TOUCH) += touch.o
73COREUTILS-$(CONFIG_TR) += tr.o
74COREUTILS-$(CONFIG_TRUE) += true.o
75COREUTILS-$(CONFIG_TTY) += tty.o
76COREUTILS-$(CONFIG_UNAME) += uname.o
77COREUTILS-$(CONFIG_UNIQ) += uniq.o
78COREUTILS-$(CONFIG_USLEEP) += usleep.o
79COREUTILS-$(CONFIG_UUDECODE) += uudecode.o
80COREUTILS-$(CONFIG_UUENCODE) += uuencode.o
81COREUTILS-$(CONFIG_WATCH) += watch.o
82COREUTILS-$(CONFIG_WC) += wc.o
83COREUTILS-$(CONFIG_WHO) += who.o
84COREUTILS-$(CONFIG_WHOAMI) += whoami.o
85COREUTILS-$(CONFIG_YES) += yes.o
Glenn L McGrath3238ea12003-02-15 10:53:40 +000086
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000087COREUTILS-y:=$(sort $(COREUTILS-y))
Rob Landleyd6e14d82006-02-21 19:11:35 +000088
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000089ifneq ($(strip $(COREUTILS-y)),)
90libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR)
91endif
92
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000093COREUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(COREUTILS-y))
94COREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
95APPLET_SRC-y+=$(COREUTILS_SRC-y)
96APPLET_SRC-a+=$(COREUTILS_SRC-a)
Glenn L McGrath3238ea12003-02-15 10:53:40 +000097
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000098$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
99 $(do_ar)
Eric Andersen7daa0762004-10-08 07:46:08 +0000100
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +0000101$(COREUTILS_DIR)%.o: $(srcdir)/%.c
102 $(compile.c)