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 | |
| 7 | MISCUTILS_AR:=miscutils.a |
| 8 | ifndef $(MISCUTILS_DIR) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 9 | MISCUTILS_DIR:=$(top_builddir)/miscutils/ |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 10 | endif |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 11 | srcdir=$(top_srcdir)/miscutils |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
| 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 |
Bernhard Reutner-Fischer | 62d7acc | 2005-10-28 20:37:03 +0000 | [diff] [blame] | 27 | MISCUTILS-$(BB_APPLET_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 | |
Rob Landley | d6e14d8 | 2006-02-21 19:11:35 +0000 | [diff] [blame^] | 34 | ifneq ($(strip $(MISCUTILS-y)),) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 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 | |
Eric Andersen | 2053a8c | 2003-10-22 22:29:08 +0000 | [diff] [blame] | 43 | needlibm-y:= |
| 44 | needlibm-$(CONFIG_DC) := y |
| 45 | |
| 46 | ifeq ($(needlibm-y),y) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 47 | LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES)) |
Eric Andersen | 2053a8c | 2003-10-22 22:29:08 +0000 | [diff] [blame] | 48 | endif |
| 49 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 50 | $(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) |
Mike Frysinger | b38673f | 2006-02-02 01:41:53 +0000 | [diff] [blame] | 51 | $(do_ar) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 52 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 53 | $(MISCUTILS_DIR)%.o: $(srcdir)/%.c |
Mike Frysinger | b38673f | 2006-02-02 01:41:53 +0000 | [diff] [blame] | 54 | $(compile.c) |