aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/Makemodule.am
blob: ce22205cbb034e767d1224e45b806362f15011bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
LIBSQFS_HEARDS = include/sqfs/meta_writer.h \
		include/sqfs/meta_reader.h include/sqfs/id_table.h \
		include/sqfs/compressor.h include/sqfs/data_writer.h \
		include/sqfs/super.h include/sqfs/inode.h \
		include/sqfs/dir.h include/sqfs/xattr.h \
		include/sqfs/table.h include/sqfs/predef.h \
		include/sqfs/error.h include/sqfs/dir_reader.h \
		include/sqfs/dir_writer.h include/sqfs/io.h \
		include/sqfs/data_reader.h include/sqfs/block.h \
		include/sqfs/xattr_reader.h include/sqfs/xattr_writer.h

libsquashfs_la_SOURCES = $(LIBSQFS_HEARDS) lib/sqfs/id_table.c lib/sqfs/super.c
libsquashfs_la_SOURCES += lib/sqfs/readdir.c lib/sqfs/xattr.c
libsquashfs_la_SOURCES += lib/sqfs/write_table.c lib/sqfs/meta_writer.c
libsquashfs_la_SOURCES += lib/sqfs/read_super.c lib/sqfs/meta_reader.c
libsquashfs_la_SOURCES += lib/sqfs/read_inode.c lib/sqfs/write_inode.c
libsquashfs_la_SOURCES += lib/sqfs/dir_writer.c lib/sqfs/xattr_reader.c
libsquashfs_la_SOURCES += lib/sqfs/read_table.c lib/sqfs/comp/compressor.c
libsquashfs_la_SOURCES += lib/sqfs/comp/internal.h lib/sqfs/xattr_writer.c
libsquashfs_la_SOURCES += lib/sqfs/dir_reader.c lib/sqfs/read_tree.c
libsquashfs_la_SOURCES += lib/sqfs/inode.c lib/sqfs/data_writer/fragment.c
libsquashfs_la_SOURCES += lib/sqfs/write_super.c lib/sqfs/data_writer/block.c
libsquashfs_la_SOURCES += lib/sqfs/data_writer/internal.h lib/sqfs/data_reader.c
libsquashfs_la_SOURCES += lib/sqfs/data_writer/common.c
libsquashfs_la_SOURCES += lib/sqfs/data_writer/fileapi.c
libsquashfs_la_SOURCES += lib/sqfs/str_table.c lib/sqfs/str_table.h
libsquashfs_la_SOURCES += lib/sqfs/alloc.c lib/sqfs/util.h
libsquashfs_la_CPPFLAGS = $(AM_CPPFLAGS)
libsquashfs_la_LDFLAGS = $(AM_LDFLAGS)
libsquashfs_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS)
libsquashfs_la_CFLAGS += $(XZ_CFLAGS) $(LZ4_CFLAGS)
libsquashfs_la_CFLAGS += $(ZSTD_CFLAGS) $(PTHREAD_CFLAGS)
libsquashfs_la_LIBADD = $(XZ_LIBS) $(ZLIB_LIBS) $(LZ4_LIBS)
libsquashfs_la_LIBADD += $(ZSTD_LIBS) $(PTHREAD_LIBS)

if WINDOWS
libsquashfs_la_SOURCES += lib/sqfs/win32/io_file.c
libsquashfs_la_CFLAGS += -DWINVER=0x0600 -D_WIN32_WINNT=0x0600
libsquashfs_la_CFLAGS += -Wc,-static-libgcc
libsquashfs_la_LDFLAGS += -no-undefined -avoid-version
else
libsquashfs_la_SOURCES += lib/sqfs/unix/io_file.c
endif

if HAVE_PTHREAD
libsquashfs_la_SOURCES += lib/sqfs/data_writer/winpthread.c
libsquashfs_la_CPPFLAGS += -DWITH_PTHREAD
else
if WINDOWS
libsquashfs_la_SOURCES += lib/sqfs/data_writer/winpthread.c
else
libsquashfs_la_SOURCES += lib/sqfs/data_writer/serial.c
endif
endif

if WITH_GZIP
libsquashfs_la_SOURCES += lib/sqfs/comp/gzip.c
libsquashfs_la_CPPFLAGS += -DWITH_GZIP

if WITH_OWN_ZLIB
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/adler32.c
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/deflate.c
libsquashfs_la_SOURCES += lib/sqfs/comp/deflate.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/inffast.c
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/inffast.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/inffixed.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/inflate.c
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/inflate.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/lib/zlib/zconf.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/trees.c
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/inftrees.c
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/inftrees.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/zlib.h lib/sqfs/comp/zlib/trees.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/zutil.c lib/sqfs/comp/zlib/zutil.h
libsquashfs_la_SOURCES += lib/sqfs/comp/zlib/crc32.c lib/sqfs/comp/zlib/crc32.h

libsquashfs_la_CPPFLAGS += -I$(top_srcdir)/lib/sqfs/comp/zlib -DZLIB_CONST=1
libsquashfs_la_CPPFLAGS += -DNO_GZCOMPRESS=1 -DNO_GZIP=1 -DHAVE_MEMCPY=1
endif
endif

if WITH_XZ
libsquashfs_la_SOURCES += lib/sqfs/comp/xz.c
libsquashfs_la_SOURCES += lib/sqfs/comp/lzma.c
libsquashfs_la_CPPFLAGS += -DWITH_XZ
endif

if WITH_LZ4
libsquashfs_la_SOURCES += lib/sqfs/comp/lz4.c
libsquashfs_la_CPPFLAGS += -DWITH_LZ4

if WITH_OWN_LZ4
libsquashfs_la_CPPFLAGS += -I$(top_srcdir)/lib/sqfs/comp/lz4 -DLZ4_HEAPMODE=1

libsquashfs_la_SOURCES += lib/sqfs/comp/lz4/lz4.c lib/sqfs/comp/lz4/lz4.h
libsquashfs_la_SOURCES += lib/sqfs/comp/lz4/lz4hc.c lib/sqfs/comp/lz4/lz4hc.h
endif
endif

if WITH_ZSTD
libsquashfs_la_SOURCES += lib/sqfs/comp/zstd.c
libsquashfs_la_CPPFLAGS += -DWITH_ZSTD
endif

sqfsincludedir = $(includedir)/sqfs
sqfsinclude_HEADERS = $(LIBSQFS_HEARDS)

lib_LTLIBRARIES += libsquashfs.la

pkgconfig_DATA += lib/sqfs/libsquashfs0.pc

EXTRA_DIST += lib/sqfs/comp/lz4/README lib/sqfs/compzlib/README