busybox/coreutils/libcoreutils/Makefile.in

52 lines
1.7 KiB
Makefile
Raw Normal View History

2003-03-19 14:43:01 +05:30
# Makefile for busybox
#
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
2003-03-19 14:43:01 +05:30
#
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
2003-03-19 14:43:01 +05:30
#
LIBCOREUTILS_AR:=libcoreutils.a
ifndef $(LIBCOREUTILS_DIR)
LIBCOREUTILS_DIR:=$(top_builddir)/coreutils/libcoreutils
2003-03-19 14:43:01 +05:30
endif
srcdir=$(top_srcdir)/coreutils/libcoreutils
2003-03-19 14:43:01 +05:30
LIBCOREUTILS_ALL_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c
LIBCOREUTILS-y:=
LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
LIBCOREUTILS-$(CONFIG_INSTALL) += cp_mv_stat.o
LIBCOREUTILS-$(CONFIG_CP) += cp_mv_stat.o
LIBCOREUTILS-$(CONFIG_MV) += cp_mv_stat.o
LIBCOREUTILS-y:=$(sort $(LIBCOREUTILS-y))
LIBCOREUTILS_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBCOREUTILS-y)))
LIBCOREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
LIBRARY_SRC-y+=$(LIBCOREUTILS_SRC-y)
LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a)
2003-03-19 14:43:01 +05:30
LIBCOREUTILS-multi-obj:=$(LIBCOREUTILS_DIR)/$(subst .a,-multi.o,$(LIBCOREUTILS_AR))
LIBCOREUTILS-multi-pic:=$(LIBCOREUTILS_DIR)/$(subst .a,-pic.o,$(LIBCOREUTILS_AR))
# We do not need to build an empty non-pic object/archive
ifneq ($(strip $(LIBCOREUTILS-y)),)
libraries-y+=$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR)
endif
# If we are building libbusybox.so _and_ we will use it ourselves then we
# keep it as small as possible
ifeq ($(strip $(CONFIG_FEATURE_SHARED_BUSYBOX)),y)
ifneq ($(strip $(LIBIPROUTE-y)),)
libraries-m+=$(LIBCOREUTILS-multi-pic)
endif
endif
2003-03-19 14:43:01 +05:30
LIBCOREUTILS_OBJS=$(patsubst %,$(LIBCOREUTILS_DIR)/%, $(LIBCOREUTILS-y))
2003-03-19 14:43:01 +05:30
$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR): $(patsubst %,$(LIBCOREUTILS_DIR)/%,$(LIBCOREUTILS-y))
2006-02-02 07:11:53 +05:30
$(do_ar)
$(LIBCOREUTILS_DIR)/%.o: $(srcdir)/%.c
2006-02-02 07:11:53 +05:30
$(compile.c)