blob: 511652a93d2b8790873258ce42b6ca6f2ec93e84 [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
Eric Andersen674b08a2004-04-06 14:28:35 +000013APPLET_SRC:=applets.c busybox.c
Eric Andersen85208e22002-04-12 12:05:57 +000014APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
15
16libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
17
Eric Andersen85208e22002-04-12 12:05:57 +000018$(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
Mike Frysinger4d008962005-07-27 01:09:24 +000019 $(AR) $(ARFLAGS) $@ $(APPLET_OBJ)
Eric Andersen85208e22002-04-12 12:05:57 +000020
Bernhard Reutner-Fischer14b1c1d2005-10-05 14:52:21 +000021$(APPLET_OBJ): $(top_builddir)/.config
Eric Andersen7daa0762004-10-08 07:46:08 +000022$(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c
23 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
24