blob: b4fcabf048d072d27af890523049aefdc0316ad3 [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
7ARCHIVAL_AR:=archival.a
8ifndef $(ARCHIVAL_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009ARCHIVAL_DIR:=$(top_builddir)/archival/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/archival
Eric Andersen85208e22002-04-12 12:05:57 +000012
13ARCHIVAL-y:=
Glenn L McGrathbf1cc8b2002-11-01 23:38:54 +000014ARCHIVAL-$(CONFIG_APT_GET) +=
Eric Andersen85208e22002-04-12 12:05:57 +000015ARCHIVAL-$(CONFIG_AR) += ar.o
16ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o
Rob Landleyc1d69902006-01-20 18:28:50 +000017ARCHIVAL-$(CONFIG_UNLZMA) += unlzma.o
Eric Andersen85208e22002-04-12 12:05:57 +000018ARCHIVAL-$(CONFIG_CPIO) += cpio.o
19ARCHIVAL-$(CONFIG_DPKG) += dpkg.o
20ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o
21ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o
22ARCHIVAL-$(CONFIG_GZIP) += gzip.o
23ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o
Glenn L McGrathb72a7352002-12-10 00:17:22 +000024ARCHIVAL-$(CONFIG_RPM) += rpm.o
Eric Andersen85208e22002-04-12 12:05:57 +000025ARCHIVAL-$(CONFIG_TAR) += tar.o
Glenn L McGrathbf1cc8b2002-11-01 23:38:54 +000026ARCHIVAL-$(CONFIG_UNCOMPRESS) += uncompress.o
Eric Andersen85208e22002-04-12 12:05:57 +000027ARCHIVAL-$(CONFIG_UNZIP) += unzip.o
28
29libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR)
30
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000031ARCHIVAL_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(ARCHIVAL-y))
32ARCHIVAL_SRC-a:=$(wildcard $(srcdir)/*.c)
33APPLET_SRC-y+=$(ARCHIVAL_SRC-y)
34APPLET_SRC-a+=$(ARCHIVAL_SRC-a)
35
Eric Andersen85208e22002-04-12 12:05:57 +000036$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000037 $(AR) $(ARFLAGS) $@ $(^)
Eric Andersen85208e22002-04-12 12:05:57 +000038
Eric Andersen7daa0762004-10-08 07:46:08 +000039$(ARCHIVAL_DIR)%.o: $(srcdir)/%.c
40 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
41