aboutsummaryrefslogtreecommitdiff
path: root/lib/Makemodule.am
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-31 17:46:19 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-31 20:33:41 +0200
commit3b43f166629efbb34e1b0ceeaa2f06452d0fed2f (patch)
tree0ddd9e915c206027a20f6f647c4e3a7519d862ca /lib/Makemodule.am
parent2ac43d981859bda063e7067371c1cf246c7f81b0 (diff)
Turn libsquashfs.a into a shared library
This of course entails turning the entire project over to libtool magic. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/Makemodule.am')
-rw-r--r--lib/Makemodule.am103
1 files changed, 48 insertions, 55 deletions
diff --git a/lib/Makemodule.am b/lib/Makemodule.am
index 5905b26..bc08cc9 100644
--- a/lib/Makemodule.am
+++ b/lib/Makemodule.am
@@ -6,7 +6,7 @@ libfstree_a_SOURCES += lib/fstree/add_by_path.c lib/fstree/xattr.c
libfstree_a_SOURCES += lib/fstree/node_from_path.c include/fstree.h
libfstree_a_SOURCES += lib/fstree/gen_file_list.c lib/fstree/deduplicate.c
libfstree_a_SOURCES += lib/fstree/optimize_unpack_order.c
-libfstree_a_CFLAGS = $(AM_CFLAGS)
+libfstree_a_CFLAGS = $(AM_CFLAGS) $(LIBSELINUX_CFLAGS)
libfstree_a_CPPFLAGS = $(AM_CPPFLAGS)
libtar_a_SOURCES = lib/tar/read_header.c lib/tar/write_header.c lib/tar/skip.c
@@ -17,23 +17,6 @@ libtar_a_SOURCES += include/tar.h
libtar_a_CFLAGS = $(AM_CFLAGS)
libtar_a_CPPFLAGS = $(AM_CPPFLAGS)
-libsquashfs_a_SOURCES = include/meta_writer.h include/squashfs.h
-libsquashfs_a_SOURCES += lib/sqfs/meta_writer.c lib/sqfs/super.c
-libsquashfs_a_SOURCES += lib/sqfs/id_table.c include/id_table.h
-libsquashfs_a_SOURCES += lib/sqfs/write_table.c include/highlevel.h
-libsquashfs_a_SOURCES += lib/sqfs/read_super.c lib/sqfs/meta_reader.c
-libsquashfs_a_SOURCES += include/meta_reader.h lib/sqfs/id_table_write.c
-libsquashfs_a_SOURCES += lib/sqfs/id_table_read.c lib/sqfs/read_inode.c
-libsquashfs_a_SOURCES += lib/sqfs/readdir.c
-libsquashfs_a_SOURCES += lib/sqfs/xattr.c
-libsquashfs_a_SOURCES += lib/sqfs/read_table.c
-libsquashfs_a_SOURCES += lib/sqfs/comp/compressor.c lib/sqfs/comp/internal.h
-libsquashfs_a_SOURCES += include/block_processor.h include/compress.h
-libsquashfs_a_SOURCES += lib/sqfs/comp/create_block.c
-libsquashfs_a_SOURCES += lib/sqfs/comp/process_block.c
-libsquashfs_a_CFLAGS = $(AM_CFLAGS)
-libsquashfs_a_CPPFLAGS = $(AM_CPPFLAGS)
-
libsqfshelper_a_SOURCES = lib/sqfshelper/deserialize_fstree.c
libsqfshelper_a_SOURCES += lib/sqfshelper/serialize_fstree.c
libsqfshelper_a_SOURCES += lib/sqfshelper/statistics.c
@@ -47,66 +30,76 @@ libsqfshelper_a_SOURCES += include/data_reader.h lib/sqfshelper/data_reader.c
libsqfshelper_a_SOURCES += include/data_writer.h lib/sqfshelper/data_writer.c
libsqfshelper_a_SOURCES += include/xattr_reader.h lib/sqfshelper/write_xattr.c
-libutil_a_SOURCES = lib/util/canonicalize_name.c lib/util/write_data.c
-libutil_a_SOURCES += lib/util/read_data.c include/util.h
-libutil_a_SOURCES += lib/util/print_version.c lib/util/mkdir_p.c
-libutil_a_SOURCES += lib/util/str_table.c include/str_table.h
-libutil_a_SOURCES += lib/util/dirstack.c lib/util/padd_file.c
-libutil_a_SOURCES += lib/util/read_data_at.c lib/util/alloc.c
-libutil_a_SOURCES += lib/util/source_date_epoch.c
-libutil_a_CFLAGS = $(AM_CFLAGS)
-libutil_a_CPPFLAGS = $(AM_CPPFLAGS)
+libutil_la_SOURCES = lib/util/canonicalize_name.c lib/util/write_data.c
+libutil_la_SOURCES += lib/util/read_data.c include/util.h
+libutil_la_SOURCES += lib/util/print_version.c lib/util/mkdir_p.c
+libutil_la_SOURCES += lib/util/str_table.c include/str_table.h
+libutil_la_SOURCES += lib/util/dirstack.c lib/util/padd_file.c
+libutil_la_SOURCES += lib/util/read_data_at.c lib/util/alloc.c
+libutil_la_SOURCES += lib/util/source_date_epoch.c
+libutil_la_CFLAGS = $(AM_CFLAGS)
+libutil_la_CPPFLAGS = $(AM_CPPFLAGS)
+
+libsquashfs_la_SOURCES = include/meta_writer.h include/squashfs.h
+libsquashfs_la_SOURCES += lib/sqfs/meta_writer.c lib/sqfs/super.c
+libsquashfs_la_SOURCES += lib/sqfs/id_table.c include/id_table.h
+libsquashfs_la_SOURCES += lib/sqfs/write_table.c include/highlevel.h
+libsquashfs_la_SOURCES += lib/sqfs/read_super.c lib/sqfs/meta_reader.c
+libsquashfs_la_SOURCES += include/meta_reader.h lib/sqfs/id_table_write.c
+libsquashfs_la_SOURCES += lib/sqfs/id_table_read.c lib/sqfs/read_inode.c
+libsquashfs_la_SOURCES += lib/sqfs/readdir.c
+libsquashfs_la_SOURCES += lib/sqfs/xattr.c
+libsquashfs_la_SOURCES += lib/sqfs/read_table.c
+libsquashfs_la_SOURCES += lib/sqfs/comp/compressor.c lib/sqfs/comp/internal.h
+libsquashfs_la_SOURCES += include/block_processor.h include/compress.h
+libsquashfs_la_SOURCES += lib/sqfs/comp/create_block.c
+libsquashfs_la_SOURCES += lib/sqfs/comp/process_block.c
+libsquashfs_la_CPPFLAGS = $(AM_CPPFLAGS)
+libsquashfs_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS)
+libsquashfs_la_CFLAGS += $(XZ_CFLAGS) $(LZO_CFLAGS) $(LZ4_CFLAGS)
+libsquashfs_la_CFLAGS += $(ZSTD_CFLAGS) $(PTHREAD_CFLAGS)
+libsquashfs_la_LIBADD = $(XZ_LIBS) $(ZLIB_LIBS) $(LZO_LIBS) $(LZ4_LIBS)
+libsquashfs_la_LIBADD += $(ZSTD_LIBS) $(PTHREAD_LIBS) libutil.la
if HAVE_PTHREAD
-libsquashfs_a_SOURCES += lib/sqfs/comp/block_processor_parallel.c
-libsquashfs_a_CFLAGS += $(PTHREAD_CFLAGS)
+libsquashfs_la_SOURCES += lib/sqfs/comp/block_processor_parallel.c
else
-libsquashfs_a_SOURCES += lib/sqfs/comp/block_processor.c
+libsquashfs_la_SOURCES += lib/sqfs/comp/block_processor.c
endif
if WITH_GZIP
-libsquashfs_a_SOURCES += lib/sqfs/comp/gzip.c
-
-libsquashfs_a_CFLAGS += $(ZLIB_CFLAGS)
-libsquashfs_a_CPPFLAGS += -DWITH_GZIP
+libsquashfs_la_SOURCES += lib/sqfs/comp/gzip.c
+libsquashfs_la_CPPFLAGS += -DWITH_GZIP
-libutil_a_CFLAGS += $(ZLIB_CFLAGS)
-libutil_a_CPPFLAGS += -DWITH_GZIP
+libutil_la_CFLAGS += $(ZLIB_CFLAGS)
+libutil_la_CPPFLAGS += -DWITH_GZIP
endif
if WITH_XZ
-libsquashfs_a_SOURCES += lib/sqfs/comp/xz.c
-
-libsquashfs_a_CFLAGS += $(XZ_CFLAGS)
-libsquashfs_a_CPPFLAGS += -DWITH_XZ
+libsquashfs_la_SOURCES += lib/sqfs/comp/xz.c
+libsquashfs_la_CPPFLAGS += -DWITH_XZ
endif
if WITH_LZO
-libsquashfs_a_SOURCES += lib/sqfs/comp/lzo.c
-
-libsquashfs_a_CFLAGS += $(LZO_CFLAGS)
-libsquashfs_a_CPPFLAGS += -DWITH_LZO
+libsquashfs_la_SOURCES += lib/sqfs/comp/lzo.c
+libsquashfs_la_CPPFLAGS += -DWITH_LZO
endif
if WITH_LZ4
-libsquashfs_a_SOURCES += lib/sqfs/comp/lz4.c
-
-libsquashfs_a_CFLAGS += $(LZ4_CFLAGS)
-libsquashfs_a_CPPFLAGS += -DWITH_LZ4
+libsquashfs_la_SOURCES += lib/sqfs/comp/lz4.c
+libsquashfs_la_CPPFLAGS += -DWITH_LZ4
endif
if WITH_ZSTD
-libsquashfs_a_SOURCES += lib/sqfs/comp/zstd.c
-
-libsquashfs_a_CFLAGS += $(ZSTD_CFLAGS)
-libsquashfs_a_CPPFLAGS += -DWITH_ZSTD
+libsquashfs_la_SOURCES += lib/sqfs/comp/zstd.c
+libsquashfs_la_CPPFLAGS += -DWITH_ZSTD
endif
if WITH_SELINUX
libfstree_a_SOURCES += lib/fstree/selinux.c
-
-libfstree_a_CFLAGS += $(LIBSELINUX_CFLAGS)
libfstree_a_CPPFLAGS += -DWITH_SELINUX
endif
-noinst_LIBRARIES += libfstree.a libutil.a libsquashfs.a libtar.a libsqfshelper.a
+noinst_LIBRARIES += libfstree.a libtar.a libsqfshelper.a
+noinst_LTLIBRARIES += libutil.la
+lib_LTLIBRARIES += libsquashfs.la