- shared libbusybox.
[oweals/busybox.git] / archival / libunarchive / Makefile.in
1 # Makefile for busybox
2 #
3 # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4 #
5 # Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
6 #
7
8 LIBUNARCHIVE_AR:=libunarchive.a
9 ifndef $(LIBUNARCHIVE_DIR)
10 LIBUNARCHIVE_DIR:=$(top_builddir)/archival/libunarchive
11 endif
12 srcdir=$(top_srcdir)/archival/libunarchive
13
14 LIBUNARCHIVE-obj:=$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR)
15 LIBUNARCHIVE-pic:=$(LIBUNARCHIVE_DIR)/$(subst .a,-pic.a,$(LIBUNARCHIVE_AR))
16
17 libraries-y+=$(LIBUNARCHIVE-obj)
18
19 LIBUNARCHIVE-y:= \
20 \
21         data_skip.o \
22         data_extract_all.o \
23         data_extract_to_stdout.o \
24         data_extract_to_buffer.o \
25 \
26         filter_accept_all.o \
27         filter_accept_list.o \
28         filter_accept_reject_list.o \
29 \
30         header_skip.o \
31         header_list.o \
32         header_verbose_list.o \
33 \
34         archive_xread_all.o \
35         archive_xread_all_eof.o \
36 \
37         seek_by_char.o \
38         seek_by_jump.o \
39 \
40         data_align.o \
41         find_list_entry.o \
42         open_transformer.o \
43         init_handle.o
44
45 GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o
46 DPKG_FILES:= \
47         get_header_ar.o \
48         unpack_ar_archive.o \
49         get_header_tar.o \
50         filter_accept_list_reassign.o
51
52 LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
53 LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
54 LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o
55 LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES)
56 LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
57 LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
58 LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
59 LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
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_GZIP) += $(GUNZIP_FILES) get_header_tar_gz.o
66 LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_COMPRESS) += decompress_uncompress.o
67 LIBUNARCHIVE-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
68 LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
69
70
71 LIBUNARCHIVE-y:=$(sort $(LIBUNARCHIVE-y))
72
73 LIBUNARCHIVE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBUNARCHIVE-y)))
74 LIBUNARCHIVE_SRC-a:=$(wildcard $(srcdir)/*.c)
75 LIBRARY_SRC-y+=$(LIBUNARCHIVE_SRC-y)
76 LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a)
77
78 $(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)/%,$(LIBUNARCHIVE-y))
79         $(AR) $(ARFLAGS) $(@) $(^)
80
81 $(LIBUNARCHIVE_DIR)/%.o: $(srcdir)/%.c
82         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
83