[821] | 1 | # Makefile for busybox
|
---|
| 2 | #
|
---|
| 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
---|
| 4 | #
|
---|
| 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
---|
| 6 |
|
---|
| 7 | LIBCOREUTILS_AR:=libcoreutils.a
|
---|
| 8 | ifndef $(LIBCOREUTILS_DIR)
|
---|
| 9 | LIBCOREUTILS_DIR:=$(top_builddir)/coreutils/libcoreutils
|
---|
| 10 | endif
|
---|
| 11 | srcdir=$(top_srcdir)/coreutils/libcoreutils
|
---|
| 12 |
|
---|
| 13 | LIBCOREUTILS_ALL_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c
|
---|
| 14 |
|
---|
| 15 | LIBCOREUTILS-y:=
|
---|
| 16 | LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
|
---|
| 17 | LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
|
---|
| 18 | LIBCOREUTILS-$(CONFIG_INSTALL) += cp_mv_stat.o
|
---|
| 19 | LIBCOREUTILS-$(CONFIG_CP) += cp_mv_stat.o
|
---|
| 20 | LIBCOREUTILS-$(CONFIG_MV) += cp_mv_stat.o
|
---|
| 21 |
|
---|
| 22 | LIBCOREUTILS-y:=$(sort $(LIBCOREUTILS-y))
|
---|
| 23 |
|
---|
| 24 | LIBCOREUTILS_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBCOREUTILS-y)))
|
---|
| 25 | LIBCOREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
---|
| 26 | LIBRARY_SRC-y+=$(LIBCOREUTILS_SRC-y)
|
---|
| 27 | LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a)
|
---|
| 28 |
|
---|
| 29 | ifneq ($(strip $(LIBCOREUTILS-y)),)
|
---|
| 30 | libraries-y+=$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR)
|
---|
| 31 | endif
|
---|
| 32 |
|
---|
| 33 | LIBCOREUTILS_OBJS=$(patsubst %,$(LIBCOREUTILS_DIR)/%, $(LIBCOREUTILS-y))
|
---|
| 34 |
|
---|
| 35 | $(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR): $(patsubst %,$(LIBCOREUTILS_DIR)/%,$(LIBCOREUTILS-y))
|
---|
| 36 | $(do_ar)
|
---|
| 37 |
|
---|
| 38 | $(LIBCOREUTILS_DIR)/%.o: $(srcdir)/%.c
|
---|
| 39 | $(compile.c)
|
---|