blob: 2dc9ebabc704304ed20f3041cff9e5d905b52795 [file] [log] [blame]
Glenn L McGrath3238ea12003-02-15 10:53:40 +00001# Makefile for busybox
2#
Eric Andersenc7bda1c2004-03-15 08:29:22 +00003# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
Glenn L McGrath3238ea12003-02-15 10:53:40 +00004#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#
19
20COREUTILS_AR:=coreutils.a
21ifndef $(COREUTILS_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +000022COREUTILS_DIR:=$(top_builddir)/coreutils/
Glenn L McGrath3238ea12003-02-15 10:53:40 +000023endif
Eric Andersen7daa0762004-10-08 07:46:08 +000024srcdir=$(top_srcdir)/coreutils
Glenn L McGrath3238ea12003-02-15 10:53:40 +000025
26COREUTILS-y:=
Mike Frysinger5b300dd2005-05-12 22:22:50 +000027COREUTILS-$(CONFIG_BASENAME) += basename.o
28COREUTILS-$(CONFIG_CAL) += cal.o
29COREUTILS-$(CONFIG_CAT) += cat.o
30COREUTILS-$(CONFIG_CHGRP) += chgrp.o
31COREUTILS-$(CONFIG_CHMOD) += chmod.o
32COREUTILS-$(CONFIG_CHOWN) += chown.o
33COREUTILS-$(CONFIG_CHROOT) += chroot.o
34COREUTILS-$(CONFIG_CMP) += cmp.o
Mike Frysingera84a5122005-05-12 22:23:15 +000035COREUTILS-$(CONFIG_COMM) += comm.o
Mike Frysinger5b300dd2005-05-12 22:22:50 +000036COREUTILS-$(CONFIG_CP) += cp.o
37COREUTILS-$(CONFIG_CUT) += cut.o
38COREUTILS-$(CONFIG_DATE) += date.o
39COREUTILS-$(CONFIG_DD) += dd.o
40COREUTILS-$(CONFIG_DF) += df.o
41COREUTILS-$(CONFIG_DIRNAME) += dirname.o
42COREUTILS-$(CONFIG_DOS2UNIX) += dos2unix.o
43COREUTILS-$(CONFIG_DU) += du.o
44COREUTILS-$(CONFIG_ECHO) += echo.o
45COREUTILS-$(CONFIG_ENV) += env.o
46COREUTILS-$(CONFIG_EXPR) += expr.o
47COREUTILS-$(CONFIG_FALSE) += false.o
48COREUTILS-$(CONFIG_FOLD) += fold.o
49COREUTILS-$(CONFIG_HEAD) += head.o
50COREUTILS-$(CONFIG_HOSTID) += hostid.o
51COREUTILS-$(CONFIG_ID) += id.o
52COREUTILS-$(CONFIG_INSTALL) += install.o
53COREUTILS-$(CONFIG_LENGTH) += length.o
54COREUTILS-$(CONFIG_LN) += ln.o
55COREUTILS-$(CONFIG_LOGNAME) += logname.o
56COREUTILS-$(CONFIG_LS) += ls.o
57COREUTILS-$(CONFIG_MD5SUM) += md5_sha1_sum.o
58COREUTILS-$(CONFIG_MKDIR) += mkdir.o
59COREUTILS-$(CONFIG_MKFIFO) += mkfifo.o
60COREUTILS-$(CONFIG_MKNOD) += mknod.o
61COREUTILS-$(CONFIG_MV) += mv.o
62COREUTILS-$(CONFIG_NICE) += nice.o
Bernhard Reutner-Fischer9d7010c2005-09-21 18:25:05 +000063COREUTILS-$(CONFIG_NOHUP) += nohup.o
Mike Frysinger5b300dd2005-05-12 22:22:50 +000064COREUTILS-$(CONFIG_OD) += od.o
65COREUTILS-$(CONFIG_PRINTENV) += printenv.o
66COREUTILS-$(CONFIG_PRINTF) += printf.o
67COREUTILS-$(CONFIG_PWD) += pwd.o
68COREUTILS-$(CONFIG_REALPATH) += realpath.o
69COREUTILS-$(CONFIG_RM) += rm.o
70COREUTILS-$(CONFIG_RMDIR) += rmdir.o
71COREUTILS-$(CONFIG_SEQ) += seq.o
72COREUTILS-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
73COREUTILS-$(CONFIG_SLEEP) += sleep.o
74COREUTILS-$(CONFIG_SORT) += sort.o
75COREUTILS-$(CONFIG_STAT) += stat.o
76COREUTILS-$(CONFIG_STTY) += stty.o
77COREUTILS-$(CONFIG_SUM) += sum.o
78COREUTILS-$(CONFIG_SYNC) += sync.o
79COREUTILS-$(CONFIG_TAIL) += tail.o
80COREUTILS-$(CONFIG_TEE) += tee.o
81COREUTILS-$(CONFIG_TEST) += test.o
82COREUTILS-$(CONFIG_TOUCH) += touch.o
83COREUTILS-$(CONFIG_TR) += tr.o
84COREUTILS-$(CONFIG_TRUE) += true.o
85COREUTILS-$(CONFIG_TTY) += tty.o
86COREUTILS-$(CONFIG_UNAME) += uname.o
87COREUTILS-$(CONFIG_UNIQ) += uniq.o
88COREUTILS-$(CONFIG_USLEEP) += usleep.o
89COREUTILS-$(CONFIG_UUDECODE) += uudecode.o
90COREUTILS-$(CONFIG_UUENCODE) += uuencode.o
91COREUTILS-$(CONFIG_WATCH) += watch.o
92COREUTILS-$(CONFIG_WC) += wc.o
93COREUTILS-$(CONFIG_WHO) += who.o
94COREUTILS-$(CONFIG_WHOAMI) += whoami.o
95COREUTILS-$(CONFIG_YES) += yes.o
Glenn L McGrath3238ea12003-02-15 10:53:40 +000096
97libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR)
98
99$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
Mike Frysinger4d008962005-07-27 01:09:24 +0000100 $(AR) $(ARFLAGS) $@ $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
Eric Andersen7daa0762004-10-08 07:46:08 +0000101
102$(COREUTILS_DIR)%.o: $(srcdir)/%.c
103 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<