Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 6 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 7 | MISCUTILS_AR:=miscutils.a |
| 8 | ifndef $(MISCUTILS_DIR) |
| 9 | MISCUTILS_DIR:=$(top_builddir)/miscutils/ |
| 10 | endif |
| 11 | srcdir=$(top_srcdir)/miscutils |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 13 | MISCUTILS-y:= |
Mike Frysinger | 55e2cf6 | 2005-05-11 00:25:47 +0000 | [diff] [blame] | 14 | MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o |
| 15 | MISCUTILS-$(CONFIG_CROND) += crond.o |
| 16 | MISCUTILS-$(CONFIG_CRONTAB) += crontab.o |
Paul Fox | 79c142d | 2005-08-01 16:04:40 +0000 | [diff] [blame] | 17 | MISCUTILS-$(CONFIG_BBCONFIG) += bbconfig.o |
Mike Frysinger | 55e2cf6 | 2005-05-11 00:25:47 +0000 | [diff] [blame] | 18 | MISCUTILS-$(CONFIG_DC) += dc.o |
| 19 | MISCUTILS-$(CONFIG_DEVFSD) += devfsd.o |
| 20 | MISCUTILS-$(CONFIG_EJECT) += eject.o |
| 21 | MISCUTILS-$(CONFIG_HDPARM) += hdparm.o |
| 22 | MISCUTILS-$(CONFIG_LAST) += last.o |
"Vladimir N. Oleynik" | 4a5d95d | 2005-09-19 16:18:46 +0000 | [diff] [blame] | 23 | MISCUTILS-${CONFIG_LESS} += less.o |
Mike Frysinger | 55e2cf6 | 2005-05-11 00:25:47 +0000 | [diff] [blame] | 24 | MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o |
"Vladimir N. Oleynik" | 4a5d95d | 2005-09-19 16:18:46 +0000 | [diff] [blame] | 25 | MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o |
Mike Frysinger | 55e2cf6 | 2005-05-11 00:25:47 +0000 | [diff] [blame] | 26 | MISCUTILS-$(CONFIG_MT) += mt.o |
Rob Landley | 51be57e | 2006-02-23 00:42:25 +0000 | [diff] [blame] | 27 | MISCUTILS-$(CONFIG_RUNLEVEL) += runlevel.o |
Mike Frysinger | 55e2cf6 | 2005-05-11 00:25:47 +0000 | [diff] [blame] | 28 | MISCUTILS-$(CONFIG_RX) += rx.o |
Paul Fox | 4240364 | 2005-08-01 22:52:09 +0000 | [diff] [blame] | 29 | MISCUTILS-$(CONFIG_SETSID) += setsid.o |
Mike Frysinger | 55e2cf6 | 2005-05-11 00:25:47 +0000 | [diff] [blame] | 30 | MISCUTILS-$(CONFIG_STRINGS) += strings.o |
| 31 | MISCUTILS-$(CONFIG_TIME) += time.o |
| 32 | MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 33 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 34 | ifneq ($(strip $(MISCUTILS-y)),) |
| 35 | libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR) |
Rob Landley | d6e14d8 | 2006-02-21 19:11:35 +0000 | [diff] [blame] | 36 | endif |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 37 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 38 | MISCUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MISCUTILS-y)) |
| 39 | MISCUTILS_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 40 | APPLET_SRC-y+=$(MISCUTILS_SRC-y) |
| 41 | APPLET_SRC-a+=$(MISCUTILS_SRC-a) |
| 42 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 43 | needlibm-y:= |
| 44 | needlibm-$(CONFIG_DC) := y |
Eric Andersen | 2053a8c | 2003-10-22 22:29:08 +0000 | [diff] [blame] | 45 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 46 | ifeq ($(needlibm-y),y) |
| 47 | LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES)) |
| 48 | endif |
Bernhard Reutner-Fischer | 07a79e7 | 2006-03-09 09:03:37 +0000 | [diff] [blame] | 49 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 50 | $(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) |
| 51 | $(do_ar) |
| 52 | |
| 53 | $(MISCUTILS_DIR)%.o: $(srcdir)/%.c |
| 54 | $(compile.c) |