Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 6 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 7 | SHELL_AR:=shell.a |
| 8 | ifndef $(SHELL_DIR) |
| 9 | SHELL_DIR:=$(top_builddir)/shell/ |
| 10 | endif |
| 11 | srcdir=$(top_srcdir)/shell |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 13 | SHELLT-y:= |
| 14 | SHELLT-$(CONFIG_ASH) += ash.o |
| 15 | SHELLT-$(CONFIG_HUSH) += hush.o |
| 16 | SHELLT-$(CONFIG_LASH) += lash.o |
| 17 | SHELLT-$(CONFIG_MSH) += msh.o |
| 18 | SHELLT-$(CONFIG_FEATURE_COMMAND_EDITING) += cmdedit.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 19 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 20 | ifneq ($(strip $(SHELLT-y)),) |
| 21 | libraries-y+=$(SHELL_DIR)$(SHELL_AR) |
| 22 | endif |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 23 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 24 | SHELLT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(SHELLT-y)) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 25 | SHELLT_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 26 | APPLET_SRC-y+=$(SHELLT_SRC-y) |
| 27 | APPLET_SRC-a+=$(SHELLT_SRC-a) |
| 28 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 29 | $(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y)) |
| 30 | $(do_ar) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 31 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 32 | $(SHELL_DIR)%.o: $(srcdir)/%.c |
| 33 | $(compile.c) |