blob: a0b6b7233b7214f458f7d47bee29777c268dc841 [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 +00007MISCUTILS_AR:=miscutils.a
8ifndef $(MISCUTILS_DIR)
9MISCUTILS_DIR:=$(top_builddir)/miscutils/
10endif
11srcdir=$(top_srcdir)/miscutils
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013MISCUTILS-y:=
Mike Frysinger55e2cf62005-05-11 00:25:47 +000014MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o
15MISCUTILS-$(CONFIG_CROND) += crond.o
16MISCUTILS-$(CONFIG_CRONTAB) += crontab.o
Paul Fox79c142d2005-08-01 16:04:40 +000017MISCUTILS-$(CONFIG_BBCONFIG) += bbconfig.o
Mike Frysinger55e2cf62005-05-11 00:25:47 +000018MISCUTILS-$(CONFIG_DC) += dc.o
19MISCUTILS-$(CONFIG_DEVFSD) += devfsd.o
20MISCUTILS-$(CONFIG_EJECT) += eject.o
21MISCUTILS-$(CONFIG_HDPARM) += hdparm.o
22MISCUTILS-$(CONFIG_LAST) += last.o
"Vladimir N. Oleynik"4a5d95d2005-09-19 16:18:46 +000023MISCUTILS-${CONFIG_LESS} += less.o
Mike Frysinger55e2cf62005-05-11 00:25:47 +000024MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o
"Vladimir N. Oleynik"4a5d95d2005-09-19 16:18:46 +000025MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o
Mike Frysinger55e2cf62005-05-11 00:25:47 +000026MISCUTILS-$(CONFIG_MT) += mt.o
Rob Landley51be57e2006-02-23 00:42:25 +000027MISCUTILS-$(CONFIG_RUNLEVEL) += runlevel.o
Mike Frysinger55e2cf62005-05-11 00:25:47 +000028MISCUTILS-$(CONFIG_RX) += rx.o
Paul Fox42403642005-08-01 22:52:09 +000029MISCUTILS-$(CONFIG_SETSID) += setsid.o
Mike Frysinger55e2cf62005-05-11 00:25:47 +000030MISCUTILS-$(CONFIG_STRINGS) += strings.o
31MISCUTILS-$(CONFIG_TIME) += time.o
32MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o
Eric Andersen85208e22002-04-12 12:05:57 +000033
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000034ifneq ($(strip $(MISCUTILS-y)),)
35libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR)
Rob Landleyd6e14d82006-02-21 19:11:35 +000036endif
Eric Andersen85208e22002-04-12 12:05:57 +000037
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000038MISCUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MISCUTILS-y))
39MISCUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
40APPLET_SRC-y+=$(MISCUTILS_SRC-y)
41APPLET_SRC-a+=$(MISCUTILS_SRC-a)
42
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000043needlibm-y:=
44needlibm-$(CONFIG_DC) := y
Eric Andersen2053a8c2003-10-22 22:29:08 +000045
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000046ifeq ($(needlibm-y),y)
47 LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES))
48endif
Bernhard Reutner-Fischer07a79e72006-03-09 09:03:37 +000049
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000050$(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
51 $(do_ar)
52
53$(MISCUTILS_DIR)%.o: $(srcdir)/%.c
54 $(compile.c)