Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2 or later, 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 | LIBUNARCHIVE_AR:=libunarchive.a |
| 8 | ifndef $(LIBUNARCHIVE_DIR) |
| 9 | LIBUNARCHIVE_DIR:=$(top_builddir)/archival/libunarchive |
| 10 | endif |
| 11 | srcdir=$(top_srcdir)/archival/libunarchive |
| 12 | |
| 13 | LIBUNARCHIVE-obj:=$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR) |
| 14 | |
| 15 | libraries-y+=$(LIBUNARCHIVE-obj) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 16 | |
Glenn L McGrath | 7ca04f3 | 2002-09-25 02:47:48 +0000 | [diff] [blame] | 17 | LIBUNARCHIVE-y:= \ |
| 18 | \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 19 | data_skip.o \ |
| 20 | data_extract_all.o \ |
| 21 | data_extract_to_stdout.o \ |
| 22 | data_extract_to_buffer.o \ |
Glenn L McGrath | 7ca04f3 | 2002-09-25 02:47:48 +0000 | [diff] [blame] | 23 | \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 24 | filter_accept_all.o \ |
| 25 | filter_accept_list.o \ |
| 26 | filter_accept_reject_list.o \ |
Glenn L McGrath | 7ca04f3 | 2002-09-25 02:47:48 +0000 | [diff] [blame] | 27 | \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 28 | header_skip.o \ |
| 29 | header_list.o \ |
| 30 | header_verbose_list.o \ |
Glenn L McGrath | 7ca04f3 | 2002-09-25 02:47:48 +0000 | [diff] [blame] | 31 | \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 32 | archive_xread_all.o \ |
| 33 | archive_xread_all_eof.o \ |
Glenn L McGrath | 237ae42 | 2002-11-03 14:05:15 +0000 | [diff] [blame] | 34 | \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 35 | seek_by_char.o \ |
| 36 | seek_by_jump.o \ |
Glenn L McGrath | 237ae42 | 2002-11-03 14:05:15 +0000 | [diff] [blame] | 37 | \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 38 | data_align.o \ |
| 39 | find_list_entry.o \ |
| 40 | open_transformer.o \ |
| 41 | init_handle.o |
Glenn L McGrath | 7ca04f3 | 2002-09-25 02:47:48 +0000 | [diff] [blame] | 42 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 43 | GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o |
Glenn L McGrath | e81fc5f | 2003-10-28 10:44:58 +0000 | [diff] [blame] | 44 | DPKG_FILES:= \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 45 | get_header_ar.o \ |
| 46 | unpack_ar_archive.o \ |
| 47 | get_header_tar.o \ |
| 48 | filter_accept_list_reassign.o |
Glenn L McGrath | e81fc5f | 2003-10-28 10:44:58 +0000 | [diff] [blame] | 49 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 50 | LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o |
| 51 | LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o |
| 52 | LIBUNARCHIVE-$(CONFIG_UNLZMA) += decompress_unlzma.o |
| 53 | LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o |
Glenn L McGrath | e81fc5f | 2003-10-28 10:44:58 +0000 | [diff] [blame] | 54 | LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES) |
| 55 | LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += $(DPKG_FILES) |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 56 | LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o |
| 57 | LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o |
| 58 | LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o |
Glenn L McGrath | e81fc5f | 2003-10-28 10:44:58 +0000 | [diff] [blame] | 59 | LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 60 | LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o |
| 61 | LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o |
| 62 | LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o |
| 63 | LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o |
| 64 | LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o |
| 65 | LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o |
| 66 | LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_GZIP) += $(GUNZIP_FILES) get_header_tar_gz.o |
| 67 | LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_COMPRESS) += decompress_uncompress.o |
| 68 | LIBUNARCHIVE-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o |
Glenn L McGrath | e81fc5f | 2003-10-28 10:44:58 +0000 | [diff] [blame] | 69 | LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES) |
Rob Landley | 7e21d5f | 2006-04-27 23:34:46 +0000 | [diff] [blame] | 70 | LIBUNARCHIVE-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 71 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 72 | |
Rob Landley | 2d2c868 | 2005-09-14 15:41:18 +0000 | [diff] [blame] | 73 | LIBUNARCHIVE-y:=$(sort $(LIBUNARCHIVE-y)) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 74 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 75 | LIBUNARCHIVE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBUNARCHIVE-y))) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 76 | LIBUNARCHIVE_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 77 | LIBRARY_SRC-y+=$(LIBUNARCHIVE_SRC-y) |
| 78 | LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a) |
| 79 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 80 | $(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)/%,$(LIBUNARCHIVE-y)) |
| 81 | $(do_ar) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 82 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 83 | $(LIBUNARCHIVE_DIR)/%.o: $(srcdir)/%.c |
| 84 | $(compile.c) |