blob: 02bcda93b774106c27c1612ca3f1db6d47b38e72 [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 +00007APPLETS_AR:=applets.a
8ifndef $(APPLETS_DIR)
9APPLETS_DIR:=$(top_builddir)/applets/
10endif
11srcdir=$(top_srcdir)/applets
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c)
14APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000015
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000016APPLET_SRC-y+=$(APPLET_SRC)
17APPLET_SRC-a+=$(APPLET_SRC)
Eric Andersen85208e22002-04-12 12:05:57 +000018
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000019libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
Eric Andersen85208e22002-04-12 12:05:57 +000020
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000021$(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
22 $(do_ar)
Bernhard Reutner-Fischer07a79e72006-03-09 09:03:37 +000023
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000024$(APPLET_OBJ): $(top_builddir)/.config
25$(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c
26 $(compile.c)