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