blob: 46c50f81dffee3204b870f05e04171ecc0bbab9e [file] [log] [blame]
Eric Andersen85208e22002-04-12 12:05:57 +00001# Makefile for busybox
2#
Eric Andersenc7bda1c2004-03-15 08:29:22 +00003# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
Eric Andersen85208e22002-04-12 12:05:57 +00004#
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +00005# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
Eric Andersen85208e22002-04-12 12:05:57 +00006
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007LIBUNARCHIVE_AR:=libunarchive.a
8ifndef $(LIBUNARCHIVE_DIR)
9LIBUNARCHIVE_DIR:=$(top_builddir)/archival/libunarchive
10endif
11srcdir=$(top_srcdir)/archival/libunarchive
12
13LIBUNARCHIVE-obj:=$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR)
14
15libraries-y+=$(LIBUNARCHIVE-obj)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000016
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000017LIBUNARCHIVE-y:= \
18\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000019 data_skip.o \
20 data_extract_all.o \
21 data_extract_to_stdout.o \
22 data_extract_to_buffer.o \
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000023\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000024 filter_accept_all.o \
25 filter_accept_list.o \
26 filter_accept_reject_list.o \
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000027\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000028 header_skip.o \
29 header_list.o \
30 header_verbose_list.o \
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000031\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000032 archive_xread_all_eof.o \
Glenn L McGrath237ae422002-11-03 14:05:15 +000033\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000034 seek_by_char.o \
35 seek_by_jump.o \
Glenn L McGrath237ae422002-11-03 14:05:15 +000036\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000037 data_align.o \
38 find_list_entry.o \
39 open_transformer.o \
40 init_handle.o
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000041
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000042GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000043DPKG_FILES:= \
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000044 get_header_ar.o \
45 unpack_ar_archive.o \
46 get_header_tar.o \
47 filter_accept_list_reassign.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000048
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000049LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
50LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
51LIBUNARCHIVE-$(CONFIG_UNLZMA) += decompress_unlzma.o
52LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000053LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES)
54LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000055LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
56LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
57LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000058LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000059LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
60LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
61LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
62LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
63LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
64LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
65LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_GZIP) += $(GUNZIP_FILES) get_header_tar_gz.o
66LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_COMPRESS) += decompress_uncompress.o
67LIBUNARCHIVE-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000068LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
Rob Landley7e21d5f2006-04-27 23:34:46 +000069LIBUNARCHIVE-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o
Eric Andersen85208e22002-04-12 12:05:57 +000070
Eric Andersen85208e22002-04-12 12:05:57 +000071
Rob Landley2d2c8682005-09-14 15:41:18 +000072LIBUNARCHIVE-y:=$(sort $(LIBUNARCHIVE-y))
Eric Andersen85208e22002-04-12 12:05:57 +000073
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000074LIBUNARCHIVE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBUNARCHIVE-y)))
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000075LIBUNARCHIVE_SRC-a:=$(wildcard $(srcdir)/*.c)
76LIBRARY_SRC-y+=$(LIBUNARCHIVE_SRC-y)
77LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a)
78
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000079$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)/%,$(LIBUNARCHIVE-y))
80 $(do_ar)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000081
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000082$(LIBUNARCHIVE_DIR)/%.o: $(srcdir)/%.c
83 $(compile.c)