made "test" an ash built-in.
[oweals/busybox.git] / coreutils / Makefile.in
index dd6d2faa821710bea6a02c1a1a92b54e531679ef..50c090f8db190c028ff0fd93c666f3e599637c6b 100644 (file)
@@ -1,21 +1,8 @@
 # Makefile for busybox
 #
-# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
 #
+# Licensed under the GPL v2, see the file LICENSE in this tarball.
 
 COREUTILS_AR:=coreutils.a
 ifndef $(COREUTILS_DIR)
@@ -27,10 +14,12 @@ COREUTILS-y:=
 COREUTILS-$(CONFIG_BASENAME)  += basename.o
 COREUTILS-$(CONFIG_CAL)       += cal.o
 COREUTILS-$(CONFIG_CAT)       += cat.o
+COREUTILS-$(CONFIG_CATV)      += catv.o
 COREUTILS-$(CONFIG_CHGRP)     += chgrp.o
 COREUTILS-$(CONFIG_CHMOD)     += chmod.o
 COREUTILS-$(CONFIG_CHOWN)     += chown.o
 COREUTILS-$(CONFIG_CHROOT)    += chroot.o
+COREUTILS-$(CONFIG_CKSUM)     += cksum.o
 COREUTILS-$(CONFIG_CMP)       += cmp.o
 COREUTILS-$(CONFIG_COMM)      += comm.o
 COREUTILS-$(CONFIG_CP)        += cp.o
@@ -38,6 +27,7 @@ COREUTILS-$(CONFIG_CUT)       += cut.o
 COREUTILS-$(CONFIG_DATE)      += date.o
 COREUTILS-$(CONFIG_DD)        += dd.o
 COREUTILS-$(CONFIG_DF)        += df.o
+COREUTILS-$(CONFIG_DIFF)      += diff.o
 COREUTILS-$(CONFIG_DIRNAME)   += dirname.o
 COREUTILS-$(CONFIG_DOS2UNIX)  += dos2unix.o
 COREUTILS-$(CONFIG_DU)        += du.o
@@ -60,6 +50,7 @@ COREUTILS-$(CONFIG_MKFIFO)    += mkfifo.o
 COREUTILS-$(CONFIG_MKNOD)     += mknod.o
 COREUTILS-$(CONFIG_MV)        += mv.o
 COREUTILS-$(CONFIG_NICE)      += nice.o
+COREUTILS-$(CONFIG_NOHUP)     += nohup.o
 COREUTILS-$(CONFIG_OD)        += od.o
 COREUTILS-$(CONFIG_PRINTENV)  += printenv.o
 COREUTILS-$(CONFIG_PRINTF)    += printf.o
@@ -93,10 +84,19 @@ COREUTILS-$(CONFIG_WHO)       += who.o
 COREUTILS-$(CONFIG_WHOAMI)    += whoami.o
 COREUTILS-$(CONFIG_YES)       += yes.o
 
+COREUTILS-y:=$(sort $(COREUTILS-y))
+
+ifneq ($(strip $(COREUTILS-y)),)
 libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR)
+endif
+
+COREUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(COREUTILS-y))
+COREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
+APPLET_SRC-y+=$(COREUTILS_SRC-y)
+APPLET_SRC-a+=$(COREUTILS_SRC-a)
 
 $(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
-       $(AR) -ro $@ $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
+       $(do_ar)
 
 $(COREUTILS_DIR)%.o: $(srcdir)/%.c
-       $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+       $(compile.c)