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 | |
| 7 | APPLETS_AR:=applets.a |
| 8 | ifndef $(APPLETS_DIR) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 9 | APPLETS_DIR:=$(top_builddir)/applets/ |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 10 | endif |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 11 | srcdir=$(top_srcdir)/applets |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
"Vladimir N. Oleynik" | dd1ccdd | 2006-02-16 15:40:24 +0000 | [diff] [blame] | 13 | APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 14 | APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC)) |
| 15 | |
| 16 | APPLET_SRC-y+=$(APPLET_SRC) |
| 17 | APPLET_SRC-a+=$(APPLET_SRC) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 18 | |
| 19 | libraries-y+=$(APPLETS_DIR)$(APPLETS_AR) |
| 20 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 21 | $(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ) |
Mike Frysinger | b38673f | 2006-02-02 01:41:53 +0000 | [diff] [blame] | 22 | $(do_ar) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 23 | |
Bernhard Reutner-Fischer | 14b1c1d | 2005-10-05 14:52:21 +0000 | [diff] [blame] | 24 | $(APPLET_OBJ): $(top_builddir)/.config |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 25 | $(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c |
Mike Frysinger | b38673f | 2006-02-02 01:41:53 +0000 | [diff] [blame] | 26 | $(compile.c) |