blob: 808ce36dec27cab2b2c6364a4f76a8234298b5c6 [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
7MISCUTILS_AR:=miscutils.a
8ifndef $(MISCUTILS_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009MISCUTILS_DIR:=$(top_builddir)/miscutils/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/miscutils
Eric Andersen85208e22002-04-12 12:05:57 +000012
13MISCUTILS-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
27MISCUTILS-$(CONFIG_RX) += rx.o
Paul Fox42403642005-08-01 22:52:09 +000028MISCUTILS-$(CONFIG_SETSID) += setsid.o
Mike Frysinger55e2cf62005-05-11 00:25:47 +000029MISCUTILS-$(CONFIG_STRINGS) += strings.o
30MISCUTILS-$(CONFIG_TIME) += time.o
31MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o
Eric Andersen85208e22002-04-12 12:05:57 +000032
33libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR)
34
Eric Andersen2053a8c2003-10-22 22:29:08 +000035needlibm-y:=
36needlibm-$(CONFIG_DC) := y
37
38ifeq ($(needlibm-y),y)
39 LIBRARIES += -lm
40endif
41
Eric Andersen85208e22002-04-12 12:05:57 +000042$(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000043 $(AR) $(ARFLAGS) $@ $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
Eric Andersen85208e22002-04-12 12:05:57 +000044
Eric Andersen7daa0762004-10-08 07:46:08 +000045$(MISCUTILS_DIR)%.o: $(srcdir)/%.c
46 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
47