blob: 261c49b02ab995d82359ac74b3aa1ec96d911574 [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
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007PROCPS_AR:=procps.a
8ifndef $(PROCPS_DIR)
9PROCPS_DIR:=$(top_builddir)/procps/
10endif
11srcdir=$(top_srcdir)/procps
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013PROCPS-y:=
Eric Andersen85208e22002-04-12 12:05:57 +000014PROCPS-$(CONFIG_FREE) += free.o
15PROCPS-$(CONFIG_KILL) += kill.o
16PROCPS-$(CONFIG_PIDOF) += pidof.o
17PROCPS-$(CONFIG_PS) += ps.o
18PROCPS-$(CONFIG_RENICE) += renice.o
Eric Andersen5d38f5b2005-09-12 21:42:48 +000019PROCPS-$(CONFIG_BB_SYSCTL) += sysctl.o
Eric Andersen420b2082002-09-17 22:14:58 +000020PROCPS-$(CONFIG_TOP) += top.o
Eric Andersen85208e22002-04-12 12:05:57 +000021PROCPS-$(CONFIG_UPTIME) += uptime.o
Rob Landleyaa872762005-10-28 13:05:12 +000022PROCPS-$(CONFIG_FUSER) += fuser.o
Eric Andersen85208e22002-04-12 12:05:57 +000023
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000024ifneq ($(strip $(PROCPS-y)),)
25libraries-y+=$(PROCPS_DIR)$(PROCPS_AR)
26endif
Eric Andersen85208e22002-04-12 12:05:57 +000027
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000028PROCPS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(PROCPS-y))
29PROCPS_SRC-a:=$(wildcard $(srcdir)/*.c)
30APPLET_SRC-y+=$(PROCPS_SRC-y)
31APPLET_SRC-a+=$(PROCPS_SRC-a)
32
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000033$(PROCPS_DIR)$(PROCPS_AR): $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y))
34 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000035
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000036$(PROCPS_DIR)%.o: $(srcdir)/%.c
37 $(compile.c)