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 | |
Eric Andersen | 674b08a | 2004-04-06 14:28:35 +0000 | [diff] [blame] | 13 | APPLET_SRC:=applets.c busybox.c |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 14 | APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC)) |
| 15 | |
| 16 | libraries-y+=$(APPLETS_DIR)$(APPLETS_AR) |
| 17 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 18 | $(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ) |
Mike Frysinger | 4d00896 | 2005-07-27 01:09:24 +0000 | [diff] [blame] | 19 | $(AR) $(ARFLAGS) $@ $(APPLET_OBJ) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 20 | |
Bernhard Reutner-Fischer | 14b1c1d | 2005-10-05 14:52:21 +0000 | [diff] [blame] | 21 | $(APPLET_OBJ): $(top_builddir)/.config |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 22 | $(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c |
| 23 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
| 24 | |