blob: 928e5bf8bca0c7f2ecdc1c6ce28ae8b523b18bec [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.o \
33 archive_xread_all_eof.o \
Glenn L McGrath237ae422002-11-03 14:05:15 +000034\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000035 seek_by_char.o \
36 seek_by_jump.o \
Glenn L McGrath237ae422002-11-03 14:05:15 +000037\
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000038 data_align.o \
39 find_list_entry.o \
40 open_transformer.o \
41 init_handle.o
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000042
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000043GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000044DPKG_FILES:= \
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000045 get_header_ar.o \
46 unpack_ar_archive.o \
47 get_header_tar.o \
48 filter_accept_list_reassign.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000049
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000050LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
51LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
52LIBUNARCHIVE-$(CONFIG_UNLZMA) += decompress_unlzma.o
53LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000054LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES)
55LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000056LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
57LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
58LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000059LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000060LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
61LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
62LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
63LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
64LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
65LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
66LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_GZIP) += $(GUNZIP_FILES) get_header_tar_gz.o
67LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_COMPRESS) += decompress_uncompress.o
68LIBUNARCHIVE-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
Glenn L McGrathe81fc5f2003-10-28 10:44:58 +000069LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
Rob Landley7e21d5f2006-04-27 23:34:46 +000070LIBUNARCHIVE-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o
Eric Andersen85208e22002-04-12 12:05:57 +000071
Eric Andersen85208e22002-04-12 12:05:57 +000072
Rob Landley2d2c8682005-09-14 15:41:18 +000073LIBUNARCHIVE-y:=$(sort $(LIBUNARCHIVE-y))
Eric Andersen85208e22002-04-12 12:05:57 +000074
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000075LIBUNARCHIVE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBUNARCHIVE-y)))
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000076LIBUNARCHIVE_SRC-a:=$(wildcard $(srcdir)/*.c)
77LIBRARY_SRC-y+=$(LIBUNARCHIVE_SRC-y)
78LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a)
79
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000080$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)/%,$(LIBUNARCHIVE-y))
81 $(do_ar)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000082
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000083$(LIBUNARCHIVE_DIR)/%.o: $(srcdir)/%.c
84 $(compile.c)