Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 6 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame^] | 7 | ARCHIVAL_AR:=archival.a |
| 8 | ifndef $(ARCHIVAL_DIR) |
| 9 | ARCHIVAL_DIR:=$(top_builddir)/archival/ |
| 10 | endif |
| 11 | srcdir=$(top_srcdir)/archival |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame^] | 13 | ARCHIVAL-y:= |
| 14 | ARCHIVAL-$(CONFIG_APT_GET) += |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 15 | ARCHIVAL-$(CONFIG_AR) += ar.o |
| 16 | ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o |
Rob Landley | c1d6990 | 2006-01-20 18:28:50 +0000 | [diff] [blame] | 17 | ARCHIVAL-$(CONFIG_UNLZMA) += unlzma.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 18 | ARCHIVAL-$(CONFIG_CPIO) += cpio.o |
| 19 | ARCHIVAL-$(CONFIG_DPKG) += dpkg.o |
| 20 | ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o |
| 21 | ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o |
| 22 | ARCHIVAL-$(CONFIG_GZIP) += gzip.o |
| 23 | ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o |
Glenn L McGrath | b72a735 | 2002-12-10 00:17:22 +0000 | [diff] [blame] | 24 | ARCHIVAL-$(CONFIG_RPM) += rpm.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 25 | ARCHIVAL-$(CONFIG_TAR) += tar.o |
Glenn L McGrath | bf1cc8b | 2002-11-01 23:38:54 +0000 | [diff] [blame] | 26 | ARCHIVAL-$(CONFIG_UNCOMPRESS) += uncompress.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 27 | ARCHIVAL-$(CONFIG_UNZIP) += unzip.o |
| 28 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame^] | 29 | ifneq ($(strip $(ARCHIVAL-y)),) |
| 30 | libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR) |
| 31 | endif |
| 32 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 33 | ARCHIVAL_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(ARCHIVAL-y)) |
| 34 | ARCHIVAL_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 35 | APPLET_SRC-y+=$(ARCHIVAL_SRC-y) |
| 36 | APPLET_SRC-a+=$(ARCHIVAL_SRC-a) |
| 37 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame^] | 38 | $(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) |
| 39 | $(do_ar) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 40 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame^] | 41 | $(ARCHIVAL_DIR)%.o: $(srcdir)/%.c |
| 42 | $(compile.c) |