blob: f61f90a1ac25b76205881883939ec52f1845c6d4 [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
7SHELL_AR:=shell.a
8ifndef $(SHELL_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009SHELL_DIR:=$(top_builddir)/shell/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/shell
Eric Andersen85208e22002-04-12 12:05:57 +000012
13SHELLT-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
19
20libraries-y+=$(SHELL_DIR)$(SHELL_AR)
21
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000022SHELLT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(SHELLT-y))
23SHELLT_SRC-a:=$(wildcard $(srcdir)/*.c)
24APPLET_SRC-y+=$(SHELLT_SRC-y)
25APPLET_SRC-a+=$(SHELLT_SRC-a)
26
Eric Andersen85208e22002-04-12 12:05:57 +000027$(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000028 $(AR) $(ARFLAGS) $@ $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y))
Eric Andersen85208e22002-04-12 12:05:57 +000029
Eric Andersen7daa0762004-10-08 07:46:08 +000030$(SHELL_DIR)%.o: $(srcdir)/%.c
31 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
32