blob: 25a2d38d35660076236d64959a98397703a0f350 [file] [log] [blame]
Eric Andersen85208e22002-04-12 12:05:57 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Eric Andersen85208e22002-04-12 12:05:57 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Eric Andersen85208e22002-04-12 12:05:57 +00006
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007FINDUTILS_AR:=findutils.a
8ifndef $(FINDUTILS_DIR)
9FINDUTILS_DIR:=$(top_builddir)/findutils/
10endif
11srcdir=$(top_srcdir)/findutils
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013FINDUTILS-y:=
Eric Andersen85208e22002-04-12 12:05:57 +000014FINDUTILS-$(CONFIG_FIND) += find.o
15FINDUTILS-$(CONFIG_GREP) += grep.o
Eric Andersen85208e22002-04-12 12:05:57 +000016FINDUTILS-$(CONFIG_XARGS) += xargs.o
17
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000018ifneq ($(strip $(FINDUTILS-y)),)
19libraries-y+=$(FINDUTILS_DIR)$(FINDUTILS_AR)
20endif
21
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000022FINDUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(FINDUTILS-y))
23FINDUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
24APPLET_SRC-y+=$(FINDUTILS_SRC-y)
25APPLET_SRC-a+=$(FINDUTILS_SRC-a)
26
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000027$(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
28 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000029
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000030$(FINDUTILS_DIR)%.o: $(srcdir)/%.c
31 $(compile.c)