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
7PROCPS_AR:=procps.a
8ifndef $(PROCPS_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009PROCPS_DIR:=$(top_builddir)/procps/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/procps
Eric Andersen85208e22002-04-12 12:05:57 +000012
Eric Andersen506177d2002-09-30 20:53:38 +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
Rob Landleyd6e14d82006-02-21 19:11:35 +000024ifneq ($(strip $(PROCPS-y)),)
Eric Andersen85208e22002-04-12 12:05:57 +000025libraries-y+=$(PROCPS_DIR)$(PROCPS_AR)
Rob Landleyd6e14d82006-02-21 19:11:35 +000026endif
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
Eric Andersen85208e22002-04-12 12:05:57 +000033$(PROCPS_DIR)$(PROCPS_AR): $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y))
Mike Frysingerb38673f2006-02-02 01:41:53 +000034 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000035
Eric Andersen7daa0762004-10-08 07:46:08 +000036$(PROCPS_DIR)%.o: $(srcdir)/%.c
Mike Frysingerb38673f2006-02-02 01:41:53 +000037 $(compile.c)