blob: 276ef412782caf3cd84fcdeb6ee1a00280b495b8 [file] [log] [blame]
Eric Andersen85208e22002-04-12 12:05:57 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Eric Andersen85208e22002-04-12 12:05:57 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Eric Andersen85208e22002-04-12 12:05:57 +00006
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007ARCHIVAL_AR:=archival.a
8ifndef $(ARCHIVAL_DIR)
9ARCHIVAL_DIR:=$(top_builddir)/archival/
10endif
11srcdir=$(top_srcdir)/archival
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013ARCHIVAL-y:=
Eric Andersen85208e22002-04-12 12:05:57 +000014ARCHIVAL-$(CONFIG_AR) += ar.o
15ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o
Rob Landleyc1d69902006-01-20 18:28:50 +000016ARCHIVAL-$(CONFIG_UNLZMA) += unlzma.o
Eric Andersen85208e22002-04-12 12:05:57 +000017ARCHIVAL-$(CONFIG_CPIO) += cpio.o
18ARCHIVAL-$(CONFIG_DPKG) += dpkg.o
19ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o
20ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o
21ARCHIVAL-$(CONFIG_GZIP) += gzip.o
22ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o
Glenn L McGrathb72a7352002-12-10 00:17:22 +000023ARCHIVAL-$(CONFIG_RPM) += rpm.o
Eric Andersen85208e22002-04-12 12:05:57 +000024ARCHIVAL-$(CONFIG_TAR) += tar.o
Glenn L McGrathbf1cc8b2002-11-01 23:38:54 +000025ARCHIVAL-$(CONFIG_UNCOMPRESS) += uncompress.o
Eric Andersen85208e22002-04-12 12:05:57 +000026ARCHIVAL-$(CONFIG_UNZIP) += unzip.o
27
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000028ifneq ($(strip $(ARCHIVAL-y)),)
29libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR)
30endif
31
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000032ARCHIVAL_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(ARCHIVAL-y))
33ARCHIVAL_SRC-a:=$(wildcard $(srcdir)/*.c)
34APPLET_SRC-y+=$(ARCHIVAL_SRC-y)
35APPLET_SRC-a+=$(ARCHIVAL_SRC-a)
36
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000037$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
38 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000039
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000040$(ARCHIVAL_DIR)%.o: $(srcdir)/%.c
41 $(compile.c)