blob: 4a715d0d8d0538dcf9ff6893638551c7abb651fa [file] [log] [blame]
Glenn L McGrath8f0722a2002-11-11 03:00:12 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Glenn L McGrath8f0722a2002-11-11 03:00:12 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Glenn L McGrath8f0722a2002-11-11 03:00:12 +00006
7DEBIANUTILS_AR:=debianutils.a
8ifndef $(DEBIANUTILS_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009DEBIANUTILS_DIR:=$(top_builddir)/debianutils/
Glenn L McGrath8f0722a2002-11-11 03:00:12 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/debianutils
Glenn L McGrath8f0722a2002-11-11 03:00:12 +000012
13DEBIANUTILS-y:=
14DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o
Glenn L McGrathe9080c92003-11-14 10:04:33 +000015DEBIANUTILS-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o
Glenn L McGrath8f0722a2002-11-11 03:00:12 +000016DEBIANUTILS-$(CONFIG_READLINK) += readlink.o
17DEBIANUTILS-$(CONFIG_RUN_PARTS) += run_parts.o
Eric Andersena1ed06b2003-07-26 09:16:00 +000018DEBIANUTILS-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o
Glenn L McGrath8f0722a2002-11-11 03:00:12 +000019DEBIANUTILS-$(CONFIG_WHICH) += which.o
20
21libraries-y+=$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000022DEBIANUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(DEBIANUTILS-y))
23DEBIANUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
24APPLET_SRC-y+=$(DEBIANUTILS_SRC-y)
25APPLET_SRC-a+=$(DEBIANUTILS_SRC-a)
Glenn L McGrath8f0722a2002-11-11 03:00:12 +000026
27$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR): $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000028 $(AR) $(ARFLAGS) $@ $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
Glenn L McGrath8f0722a2002-11-11 03:00:12 +000029
Eric Andersen7daa0762004-10-08 07:46:08 +000030$(DEBIANUTILS_DIR)%.o: $(srcdir)/%.c
31 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
32