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
7APPLETS_AR:=applets.a
8ifndef $(APPLETS_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009APPLETS_DIR:=$(top_builddir)/applets/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/applets
Eric Andersen85208e22002-04-12 12:05:57 +000012
"Vladimir N. Oleynik"dd1ccdd2006-02-16 15:40:24 +000013APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000014APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
15
16APPLET_SRC-y+=$(APPLET_SRC)
17APPLET_SRC-a+=$(APPLET_SRC)
Eric Andersen85208e22002-04-12 12:05:57 +000018
19libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
20
Eric Andersen85208e22002-04-12 12:05:57 +000021$(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
Mike Frysingerb38673f2006-02-02 01:41:53 +000022 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000023
Bernhard Reutner-Fischer14b1c1d2005-10-05 14:52:21 +000024$(APPLET_OBJ): $(top_builddir)/.config
Eric Andersen7daa0762004-10-08 07:46:08 +000025$(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c
Mike Frysingerb38673f2006-02-02 01:41:53 +000026 $(compile.c)