blob: db01a152a77bfc7e9e2a06d10fedf94ab23968bb [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
22$(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000023 $(AR) $(ARFLAGS) $@ $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y))
Eric Andersen85208e22002-04-12 12:05:57 +000024
Eric Andersen7daa0762004-10-08 07:46:08 +000025$(SHELL_DIR)%.o: $(srcdir)/%.c
26 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
27