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 | |
| 7 | ARCHIVAL_AR:=archival.a |
| 8 | ifndef $(ARCHIVAL_DIR) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 9 | ARCHIVAL_DIR:=$(top_builddir)/archival/ |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 10 | endif |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 11 | srcdir=$(top_srcdir)/archival |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
| 13 | ARCHIVAL-y:= |
Glenn L McGrath | bf1cc8b | 2002-11-01 23:38:54 +0000 | [diff] [blame] | 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 | |
| 29 | libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR) |
| 30 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 31 | ARCHIVAL_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(ARCHIVAL-y)) |
| 32 | ARCHIVAL_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 33 | APPLET_SRC-y+=$(ARCHIVAL_SRC-y) |
| 34 | APPLET_SRC-a+=$(ARCHIVAL_SRC-a) |
| 35 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 36 | $(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 37 | $(AR) $(ARFLAGS) $@ $(^) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 38 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 39 | $(ARCHIVAL_DIR)%.o: $(srcdir)/%.c |
| 40 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
| 41 | |