Glenn L McGrath | 3238ea1 | 2003-02-15 10:53:40 +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> |
Glenn L McGrath | 3238ea1 | 2003-02-15 10:53:40 +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. |
Glenn L McGrath | 3238ea1 | 2003-02-15 10:53:40 +0000 | [diff] [blame] | 6 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 7 | COREUTILS_AR:=coreutils.a |
| 8 | ifndef $(COREUTILS_DIR) |
| 9 | COREUTILS_DIR:=$(top_builddir)/coreutils/ |
| 10 | endif |
| 11 | srcdir=$(top_srcdir)/coreutils |
Glenn L McGrath | 3238ea1 | 2003-02-15 10:53:40 +0000 | [diff] [blame] | 12 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 13 | COREUTILS-y:= |
Mike Frysinger | 5b300dd | 2005-05-12 22:22:50 +0000 | [diff] [blame] | 14 | COREUTILS-$(CONFIG_BASENAME) += basename.o |
| 15 | COREUTILS-$(CONFIG_CAL) += cal.o |
| 16 | COREUTILS-$(CONFIG_CAT) += cat.o |
| 17 | COREUTILS-$(CONFIG_CHGRP) += chgrp.o |
| 18 | COREUTILS-$(CONFIG_CHMOD) += chmod.o |
| 19 | COREUTILS-$(CONFIG_CHOWN) += chown.o |
| 20 | COREUTILS-$(CONFIG_CHROOT) += chroot.o |
| 21 | COREUTILS-$(CONFIG_CMP) += cmp.o |
Mike Frysinger | a84a512 | 2005-05-12 22:23:15 +0000 | [diff] [blame] | 22 | COREUTILS-$(CONFIG_COMM) += comm.o |
Mike Frysinger | 5b300dd | 2005-05-12 22:22:50 +0000 | [diff] [blame] | 23 | COREUTILS-$(CONFIG_CP) += cp.o |
| 24 | COREUTILS-$(CONFIG_CUT) += cut.o |
| 25 | COREUTILS-$(CONFIG_DATE) += date.o |
| 26 | COREUTILS-$(CONFIG_DD) += dd.o |
| 27 | COREUTILS-$(CONFIG_DF) += df.o |
Bernhard Reutner-Fischer | 8f7d389 | 2006-04-06 08:11:08 +0000 | [diff] [blame^] | 28 | COREUTILS-$(CONFIG_DIFF) += diff.o |
Mike Frysinger | 5b300dd | 2005-05-12 22:22:50 +0000 | [diff] [blame] | 29 | COREUTILS-$(CONFIG_DIRNAME) += dirname.o |
| 30 | COREUTILS-$(CONFIG_DOS2UNIX) += dos2unix.o |
| 31 | COREUTILS-$(CONFIG_DU) += du.o |
| 32 | COREUTILS-$(CONFIG_ECHO) += echo.o |
| 33 | COREUTILS-$(CONFIG_ENV) += env.o |
| 34 | COREUTILS-$(CONFIG_EXPR) += expr.o |
| 35 | COREUTILS-$(CONFIG_FALSE) += false.o |
| 36 | COREUTILS-$(CONFIG_FOLD) += fold.o |
| 37 | COREUTILS-$(CONFIG_HEAD) += head.o |
| 38 | COREUTILS-$(CONFIG_HOSTID) += hostid.o |
| 39 | COREUTILS-$(CONFIG_ID) += id.o |
| 40 | COREUTILS-$(CONFIG_INSTALL) += install.o |
| 41 | COREUTILS-$(CONFIG_LENGTH) += length.o |
| 42 | COREUTILS-$(CONFIG_LN) += ln.o |
| 43 | COREUTILS-$(CONFIG_LOGNAME) += logname.o |
| 44 | COREUTILS-$(CONFIG_LS) += ls.o |
| 45 | COREUTILS-$(CONFIG_MD5SUM) += md5_sha1_sum.o |
| 46 | COREUTILS-$(CONFIG_MKDIR) += mkdir.o |
| 47 | COREUTILS-$(CONFIG_MKFIFO) += mkfifo.o |
| 48 | COREUTILS-$(CONFIG_MKNOD) += mknod.o |
| 49 | COREUTILS-$(CONFIG_MV) += mv.o |
| 50 | COREUTILS-$(CONFIG_NICE) += nice.o |
Bernhard Reutner-Fischer | 9d7010c | 2005-09-21 18:25:05 +0000 | [diff] [blame] | 51 | COREUTILS-$(CONFIG_NOHUP) += nohup.o |
Mike Frysinger | 5b300dd | 2005-05-12 22:22:50 +0000 | [diff] [blame] | 52 | COREUTILS-$(CONFIG_OD) += od.o |
| 53 | COREUTILS-$(CONFIG_PRINTENV) += printenv.o |
| 54 | COREUTILS-$(CONFIG_PRINTF) += printf.o |
| 55 | COREUTILS-$(CONFIG_PWD) += pwd.o |
| 56 | COREUTILS-$(CONFIG_REALPATH) += realpath.o |
| 57 | COREUTILS-$(CONFIG_RM) += rm.o |
| 58 | COREUTILS-$(CONFIG_RMDIR) += rmdir.o |
| 59 | COREUTILS-$(CONFIG_SEQ) += seq.o |
| 60 | COREUTILS-$(CONFIG_SHA1SUM) += md5_sha1_sum.o |
| 61 | COREUTILS-$(CONFIG_SLEEP) += sleep.o |
| 62 | COREUTILS-$(CONFIG_SORT) += sort.o |
| 63 | COREUTILS-$(CONFIG_STAT) += stat.o |
| 64 | COREUTILS-$(CONFIG_STTY) += stty.o |
| 65 | COREUTILS-$(CONFIG_SUM) += sum.o |
| 66 | COREUTILS-$(CONFIG_SYNC) += sync.o |
| 67 | COREUTILS-$(CONFIG_TAIL) += tail.o |
| 68 | COREUTILS-$(CONFIG_TEE) += tee.o |
| 69 | COREUTILS-$(CONFIG_TEST) += test.o |
| 70 | COREUTILS-$(CONFIG_TOUCH) += touch.o |
| 71 | COREUTILS-$(CONFIG_TR) += tr.o |
| 72 | COREUTILS-$(CONFIG_TRUE) += true.o |
| 73 | COREUTILS-$(CONFIG_TTY) += tty.o |
| 74 | COREUTILS-$(CONFIG_UNAME) += uname.o |
| 75 | COREUTILS-$(CONFIG_UNIQ) += uniq.o |
| 76 | COREUTILS-$(CONFIG_USLEEP) += usleep.o |
| 77 | COREUTILS-$(CONFIG_UUDECODE) += uudecode.o |
| 78 | COREUTILS-$(CONFIG_UUENCODE) += uuencode.o |
| 79 | COREUTILS-$(CONFIG_WATCH) += watch.o |
| 80 | COREUTILS-$(CONFIG_WC) += wc.o |
| 81 | COREUTILS-$(CONFIG_WHO) += who.o |
| 82 | COREUTILS-$(CONFIG_WHOAMI) += whoami.o |
| 83 | COREUTILS-$(CONFIG_YES) += yes.o |
Glenn L McGrath | 3238ea1 | 2003-02-15 10:53:40 +0000 | [diff] [blame] | 84 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 85 | COREUTILS-y:=$(sort $(COREUTILS-y)) |
Rob Landley | d6e14d8 | 2006-02-21 19:11:35 +0000 | [diff] [blame] | 86 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 87 | ifneq ($(strip $(COREUTILS-y)),) |
| 88 | libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR) |
| 89 | endif |
| 90 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 91 | COREUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(COREUTILS-y)) |
| 92 | COREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 93 | APPLET_SRC-y+=$(COREUTILS_SRC-y) |
| 94 | APPLET_SRC-a+=$(COREUTILS_SRC-a) |
Glenn L McGrath | 3238ea1 | 2003-02-15 10:53:40 +0000 | [diff] [blame] | 95 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 96 | $(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y)) |
| 97 | $(do_ar) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 98 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 99 | $(COREUTILS_DIR)%.o: $(srcdir)/%.c |
| 100 | $(compile.c) |