@@ -12,57 +12,80 @@ EXTRA_DIST = gen_swap.sh autogen.sh LICENSE CONFIGURATION PLATFORMS NEWS win
12
12
13
13
bin_PROGRAMS =
14
14
noinst_PROGRAMS =
15
-
16
- lib_LTLIBRARIES = libsquashfuse.la
15
+ lib_LTLIBRARIES =
17
16
noinst_LTLIBRARIES =
18
17
19
18
pkgincludedir = @includedir@/squashfuse
20
19
pkginclude_HEADERS = squashfuse.h squashfs_fs.h \
21
20
cache.h common.h config.h decompress.h dir.h file.h fs.h stack.h table.h \
22
21
traverse.h util.h xattr.h
23
-
24
22
pkgconfigdir = @pkgconfigdir@
25
23
pkgconfig_DATA = squashfuse.pc
26
24
27
- # Main library: libsquashfuse
28
- libsquashfuse_la_SOURCES = swap.c cache.c table.c dir.c file.c fs.c \
25
+ # Convenience lib to we get static executables
26
+ noinst_LTLIBRARIES += libsquashfuse_convenience.la
27
+ libsquashfuse_convenience_la_SOURCES = swap.c cache.c table.c dir.c file.c fs.c \
29
28
decompress.c xattr.c hash.c stack.c traverse.c util.c \
30
29
nonstd-pread.c nonstd-stat.c \
31
30
squashfs_fs.h common.h nonstd-internal.h nonstd.h swap.h cache.h table.h \
32
31
dir.h file.h decompress.h xattr.h squashfuse.h hash.h stack.h traverse.h \
33
32
util.h fs.h
33
+ libsquashfuse_convenience_la_CPPFLAGS = $(ZLIB_CPPFLAGS ) $(XZ_CPPFLAGS ) $(LZO_CPPFLAGS ) \
34
+ $(LZ4_CPPFLAGS ) $(ZSTD_CPPFLAGS ) $(FUSE_CPPFLAGS )
35
+ libsquashfuse_convenience_la_LIBADD = $(COMPRESSION_LIBS ) $(FUSE_LIBS )
36
+
37
+ # Main library: libsquashfuse
38
+ lib_LTLIBRARIES += libsquashfuse.la
39
+ libsquashfuse_la_SOURCES =
34
40
libsquashfuse_la_CPPFLAGS = $(ZLIB_CPPFLAGS ) $(XZ_CPPFLAGS ) $(LZO_CPPFLAGS ) \
35
- $(LZ4_CPPFLAGS ) $(ZSTD_CPPFLAGS )
36
- libsquashfuse_la_LIBADD =
41
+ $(LZ4_CPPFLAGS ) $(ZSTD_CPPFLAGS ) $( FUSE_CPPFLAGS )
42
+ libsquashfuse_la_LIBADD = libsquashfuse_convenience.la
37
43
38
44
if SQ_WANT_FUSE
39
45
# Helper for FUSE clients: libfuseprivate
40
46
libfuseprivate_la_SOURCES = fuseprivate.c nonstd-makedev.c nonstd-enoattr.c \
41
47
fuseprivate.h stat.h stat.c
42
48
libfuseprivate_la_CPPFLAGS = $(FUSE_CPPFLAGS )
43
- libfuseprivate_la_LIBADD =
49
+ libfuseprivate_la_LIBADD = $( COMPRESSION_LIBS ) $( FUSE_LIBS )
44
50
noinst_LTLIBRARIES += libfuseprivate.la
45
51
endif
46
52
47
53
# High-level squashfuse
48
54
if SQ_WANT_HIGHLEVEL
49
55
bin_PROGRAMS += squashfuse
50
56
squashfuse_SOURCES = hl.c
51
- squashfuse_CPPFLAGS = $(FUSE_CPPFLAGS )
52
- squashfuse_LDADD = libsquashfuse.la libfuseprivate.la $(COMPRESSION_LIBS ) \
53
- $(FUSE_LIBS )
54
-
57
+ squashfuse_CPPFLAGS = $(ZLIB_CPPFLAGS ) $(XZ_CPPFLAGS ) $(LZO_CPPFLAGS ) \
58
+ $(LZ4_CPPFLAGS ) $(ZSTD_CPPFLAGS ) $(FUSE_CPPFLAGS )
59
+ squashfuse_LDADD = libsquashfuse_convenience.la libfuseprivate.la $(COMPRESSION_LIBS ) $(FUSE_LIBS )
55
60
dist_man_MANS += squashfuse.1
56
61
endif
57
62
58
63
# Low-level squashfuse_ll, if supported
59
64
if SQ_WANT_LOWLEVEL
65
+
66
+ # convenience lib so we can link squashfuse_ll statically
67
+ noinst_LTLIBRARIES += libsquashfuse_ll_convenience.la
68
+ libsquashfuse_ll_convenience_la_SOURCES = ll.c ll_inode.c nonstd-daemon.c
69
+ libsquashfuse_ll_convenience_la_CPPFLAGS = $(ZLIB_CPPFLAGS ) $(XZ_CPPFLAGS ) $(LZO_CPPFLAGS ) \
70
+ $(LZ4_CPPFLAGS ) $(ZSTD_CPPFLAGS ) $(FUSE_CPPFLAGS )
71
+ libsquashfuse_ll_convenience_la_LIBADD = libsquashfuse_convenience.la libfuseprivate.la
72
+
73
+ # squashfuse_ll library we will install
74
+ lib_LTLIBRARIES += libsquashfuse_ll.la
75
+ libsquashfuse_ll_la_SOURCES =
76
+ libsquashfuse_ll_la_CPPFLAGS = $(ZLIB_CPPFLAGS ) $(XZ_CPPFLAGS ) $(LZO_CPPFLAGS ) \
77
+ $(LZ4_CPPFLAGS ) $(ZSTD_CPPFLAGS ) $(FUSE_CPPFLAGS )
78
+ libsquashfuse_ll_la_LIBADD = libsquashfuse_ll_convenience.la $(COMPRESSION_LIBS ) $(FUSE_LIBS )
79
+
80
+ # squashfuse_ll binary that's statically linked against internal libs
60
81
bin_PROGRAMS += squashfuse_ll
61
- squashfuse_ll_SOURCES = ll.c ll_inode.c nonstd-daemon.c ll.h
62
- squashfuse_ll_CPPFLAGS = $(FUSE_CPPFLAGS )
63
- squashfuse_ll_LDADD = libsquashfuse.la libfuseprivate.la $( COMPRESSION_LIBS ) \
64
- $(FUSE_LIBS )
82
+ squashfuse_ll_SOURCES = ll_main.c
83
+ squashfuse_ll_CPPFLAGS = $(ZLIB_CPPFLAGS ) $( XZ_CPPFLAGS ) $( LZO_CPPFLAGS ) \
84
+ $( LZ4_CPPFLAGS ) $( ZSTD_CPPFLAGS ) $( FUSE_CPPFLAGS )
85
+ squashfuse_ll_LDADD = libsquashfuse_ll_convenience.la $( COMPRESSION_LIBS ) $(FUSE_LIBS )
65
86
87
+ pkgconfig_DATA += squashfuse_ll.pc
88
+ pkginclude_HEADERS += ll.h
66
89
endif
67
90
68
91
@@ -95,6 +118,6 @@ tests/ll-smoke.sh tests/ls.sh: tests/lib.sh
95
118
# Handle generation of swap include files
96
119
CLEANFILES = swap.h.inc swap.c.inc
97
120
EXTRA_DIST += swap.h.inc swap.c.inc
98
- $(libsquashfuse_la_OBJECTS ) : swap.h.inc
121
+ $(libsquashfuse_convenience_la_OBJECTS ) : swap.h.inc
99
122
swap.h.inc swap.c.inc : gen_swap.sh squashfs_fs.h Makefile
100
123
SED=" $( SED) " $(srcdir ) /gen_swap.sh $(srcdir ) /squashfs_fs.h
0 commit comments