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 | APPLETS_AR:=applets.a |
| 8 | ifndef $(APPLETS_DIR) |
| 9 | APPLETS_DIR:=$(top_builddir)/applets/ |
| 10 | endif |
| 11 | srcdir=$(top_srcdir)/applets |
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 | APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c) |
| 14 | APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC)) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 15 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 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 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 19 | libraries-y+=$(APPLETS_DIR)$(APPLETS_AR) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 20 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 21 | $(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ) |
| 22 | $(do_ar) |
Bernhard Reutner-Fischer | 07a79e7 | 2006-03-09 09:03:37 +0000 | [diff] [blame] | 23 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 24 | $(APPLET_OBJ): $(top_builddir)/.config |
| 25 | $(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c |
| 26 | $(compile.c) |