aboutsummaryrefslogtreecommitdiff
path: root/lib/io/Makemodule.am
blob: d342063881501e68ff76b13723df7ab6707e5fd2 (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
libio_a_SOURCES = include/io/xfrm.h include/io/std.h \
	include/io/dir_iterator.h include/io/mem.h lib/io/src/internal.h \
	lib/io/src/xfrm/ostream.c \
	lib/io/src/xfrm/istream.c lib/io/src/dir_tree_iterator.c \
	lib/io/src/mem.c lib/io/src/std.c
libio_a_CFLAGS = $(AM_CFLAGS) $(ZLIB_CFLAGS) $(XZ_CFLAGS)
libio_a_CFLAGS += $(ZSTD_CFLAGS) $(BZIP2_CFLAGS)

noinst_LIBRARIES += libio.a

LIBIO_TESTS = test_istream_mem test_dir_iterator \
	test_dir_tree_iterator test_dir_tree_iterator2 test_dir_tree_iterator3

test_istream_mem_SOURCES = lib/io/test/istream_mem.c
test_istream_mem_LDADD = libio.a libcompat.a
test_istream_mem_CPPFLAGS = $(AM_CPPFLAGS)

test_dir_iterator_SOURCES = lib/io/test/dir_iterator.c
test_dir_iterator_LDADD = libio.a libsquashfs.la libutil.a libcompat.a
test_dir_iterator_CPPFLAGS = $(AM_CPPFLAGS)
test_dir_iterator_CPPFLAGS += -DTESTPATH=$(top_srcdir)/lib/io/test/testdir

test_dir_tree_iterator_SOURCES = lib/io/test/dir_tree_iterator.c
test_dir_tree_iterator_LDADD = libio.a libsquashfs.la libutil.a libcompat.a
test_dir_tree_iterator_CPPFLAGS = $(AM_CPPFLAGS)
test_dir_tree_iterator_CPPFLAGS += -DTESTPATH=$(top_srcdir)/lib/io/test/testdir

test_dir_tree_iterator2_SOURCES = lib/io/test/dir_tree_iterator2.c
test_dir_tree_iterator2_LDADD = libio.a libsquashfs.la libutil.a libcompat.a
test_dir_tree_iterator2_CPPFLAGS = $(AM_CPPFLAGS)
test_dir_tree_iterator2_CPPFLAGS += -DTESTPATH=$(top_srcdir)/lib/io/test/testdir

test_dir_tree_iterator3_SOURCES = lib/io/test/dir_tree_iterator3.c
test_dir_tree_iterator3_LDADD = libio.a libsquashfs.la libutil.a libcompat.a
test_dir_tree_iterator3_CPPFLAGS = $(AM_CPPFLAGS)
test_dir_tree_iterator3_CPPFLAGS += -DTESTPATH=$(top_srcdir)/lib/io/test/testdir

if WITH_XZ
test_io_xfrm_xz_SOURCES = lib/io/test/xfrm.c
test_io_xfrm_xz_LDADD = libsquashfs.la libio.a libxfrm.a libcompat.a $(XZ_LIBS)
test_io_xfrm_xz_CPPFLAGS = $(AM_CPPFLAGS) -DDO_XZ=1

LIBIO_TESTS += test_io_xfrm_xz
endif

if WITH_BZIP2
test_io_xfrm_bzip2_SOURCES = lib/io/test/xfrm.c
test_io_xfrm_bzip2_LDADD = libsquashfs.la libio.a libxfrm.a \
	libcompat.a $(BZIP2_LIBS)
test_io_xfrm_bzip2_CPPFLAGS = $(AM_CPPFLAGS) -DDO_BZIP2=1

LIBIO_TESTS += test_io_xfrm_bzip2
endif

if WITH_GZIP
test_io_xfrm_gzip_SOURCES = lib/io/test/xfrm.c
test_io_xfrm_gzip_LDADD = libsquashfs.la libio.a libxfrm.a \
	libcompat.a $(ZLIB_LIBS)
test_io_xfrm_gzip_CPPFLAGS = $(AM_CPPFLAGS) -DDO_GZIP=1

LIBIO_TESTS += test_io_xfrm_gzip
endif

if WITH_ZSTD
if HAVE_ZSTD_STREAM
test_io_xfrm_zstd_SOURCES = lib/io/test/xfrm.c
test_io_xfrm_zstd_LDADD = libsquashfs.la libio.a libxfrm.a \
	libcompat.a $(ZSTD_LIBS)
test_io_xfrm_zstd_CPPFLAGS = $(AM_CPPFLAGS) -DDO_ZSTD=1

LIBIO_TESTS += test_io_xfrm_zstd
endif
endif

check_PROGRAMS += $(LIBIO_TESTS)
TESTS += $(LIBIO_TESTS)

EXTRA_DIST += $(top_srcdir)/lib/io/test/testdir