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 |
| 27 | MISCUTILS-$(CONFIG_RX) += rx.o |
Paul Fox | 4240364 | 2005-08-01 22:52:09 +0000 | [diff] [blame] | 28 | MISCUTILS-$(CONFIG_SETSID) += setsid.o |
Mike Frysinger | 55e2cf6 | 2005-05-11 00:25:47 +0000 | [diff] [blame] | 29 | MISCUTILS-$(CONFIG_STRINGS) += strings.o |
| 30 | MISCUTILS-$(CONFIG_TIME) += time.o |
| 31 | MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 32 | |
| 33 | libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR) |
| 34 | |
Eric Andersen | 2053a8c | 2003-10-22 22:29:08 +0000 | [diff] [blame] | 35 | needlibm-y:= |
| 36 | needlibm-$(CONFIG_DC) := y |
| 37 | |
| 38 | ifeq ($(needlibm-y),y) |
| 39 | LIBRARIES += -lm |
| 40 | endif |
| 41 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 42 | $(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) |
Mike Frysinger | 4d00896 | 2005-07-27 01:09:24 +0000 | [diff] [blame] | 43 | $(AR) $(ARFLAGS) $@ $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 44 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 45 | $(MISCUTILS_DIR)%.o: $(srcdir)/%.c |
| 46 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
| 47 | |