blob: 2dcb702e86f302c814eb99b85b5261545804663a [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
7FINDUTILS_AR:=findutils.a
8ifndef $(FINDUTILS_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009FINDUTILS_DIR:=$(top_builddir)/findutils/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/findutils
Eric Andersen85208e22002-04-12 12:05:57 +000012
13FINDUTILS-y:=
14FINDUTILS-$(CONFIG_FIND) += find.o
15FINDUTILS-$(CONFIG_GREP) += grep.o
Eric Andersen85208e22002-04-12 12:05:57 +000016FINDUTILS-$(CONFIG_XARGS) += xargs.o
17
18libraries-y+=$(FINDUTILS_DIR)$(FINDUTILS_AR)
19
20$(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000021 $(AR) $(ARFLAGS) $@ $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
Eric Andersen85208e22002-04-12 12:05:57 +000022
Eric Andersen7daa0762004-10-08 07:46:08 +000023$(FINDUTILS_DIR)%.o: $(srcdir)/%.c
24 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
25