blob: f4ec6794ec80b390b7683f778030963d5409bd0c [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
17ARCHIVAL-$(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
28libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR)
29
30$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000031 $(AR) $(ARFLAGS) $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
Eric Andersen85208e22002-04-12 12:05:57 +000032
Eric Andersen7daa0762004-10-08 07:46:08 +000033$(ARCHIVAL_DIR)%.o: $(srcdir)/%.c
34 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
35