blob: fcd93f34509b9a86d1048431b52c7ff054858400 [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 +00007SHELL_AR:=shell.a
8ifndef $(SHELL_DIR)
9SHELL_DIR:=$(top_builddir)/shell/
10endif
11srcdir=$(top_srcdir)/shell
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013SHELLT-y:=
14SHELLT-$(CONFIG_ASH) += ash.o
15SHELLT-$(CONFIG_HUSH) += hush.o
16SHELLT-$(CONFIG_LASH) += lash.o
17SHELLT-$(CONFIG_MSH) += msh.o
18SHELLT-$(CONFIG_FEATURE_COMMAND_EDITING) += cmdedit.o
Eric Andersen85208e22002-04-12 12:05:57 +000019
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000020ifneq ($(strip $(SHELLT-y)),)
21libraries-y+=$(SHELL_DIR)$(SHELL_AR)
22endif
Eric Andersen85208e22002-04-12 12:05:57 +000023
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000024SHELLT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(SHELLT-y))
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000025SHELLT_SRC-a:=$(wildcard $(srcdir)/*.c)
26APPLET_SRC-y+=$(SHELLT_SRC-y)
27APPLET_SRC-a+=$(SHELLT_SRC-a)
28
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000029$(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y))
30 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000031
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000032$(SHELL_DIR)%.o: $(srcdir)/%.c
33 $(compile.c)