aboutsummaryrefslogtreecommitdiff
path: root/lib/xfrm/Makemodule.am
blob: a517df7a3b682e52e8b3b07332649ae572c53236 (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
LIBXFRM_LIBS = $(ZLIB_LIBS) $(XZ_LIBS) $(BZIP2_LIBS) $(ZSTD_LIBS)
LIBXFRM_TESTS =

libxfrm_a_SOURCES = include/xfrm/stream.h include/xfrm/compress.h \
	lib/xfrm/src/compress.c
libxfrm_a_CFLAGS = $(AM_CFLAGS)

if WITH_XZ
libxfrm_a_SOURCES += lib/xfrm/src/xz.c
libxfrm_a_CFLAGS += $(XZ_CFLAGS) -DWITH_XZ

test_unpack_xz_SOURCES = lib/xfrm/test/unpack.c
test_unpack_xz_LDADD = libxfrm.a $(XZ_LIBS)
test_unpack_xz_CPPFLAGS = $(AM_CPPFLAGS) -DDO_XZ=1

test_pack_xz_SOURCES = lib/xfrm/test/pack.c
test_pack_xz_LDADD = libxfrm.a $(LIBXFRM_LIBS)
test_pack_xz_CPPFLAGS = $(AM_CPPFLAGS) -DDO_XZ=1

LIBXFRM_TESTS += test_pack_xz test_unpack_xz
endif

if WITH_BZIP2
libxfrm_a_SOURCES += lib/xfrm/src/bzip2.c
libxfrm_a_CFLAGS += $(BZIP2_CFLAGS) -DWITH_BZIP2

test_unpack_bzip2_SOURCES = lib/xfrm/test/unpack.c
test_unpack_bzip2_LDADD = libxfrm.a $(BZIP2_LIBS)
test_unpack_bzip2_CPPFLAGS = $(AM_CPPFLAGS) -DDO_BZIP2=1

test_pack_bzip2_SOURCES = lib/xfrm/test/pack.c
test_pack_bzip2_LDADD = libxfrm.a $(LIBXFRM_LIBS)
test_pack_bzip2_CPPFLAGS = $(AM_CPPFLAGS) -DDO_BZIP2=1

LIBXFRM_TESTS += test_unpack_bzip2 test_pack_bzip2
endif

if WITH_GZIP
libxfrm_a_SOURCES += lib/xfrm/src/gzip.c
libxfrm_a_CFLAGS += $(ZLIB_CFLAGS) -DWITH_GZIP

test_unpack_gzip_SOURCES = lib/xfrm/test/unpack.c
test_unpack_gzip_LDADD = libxfrm.a $(ZLIB_LIBS)
test_unpack_gzip_CPPFLAGS = $(AM_CPPFLAGS) -DDO_GZIP=1

test_pack_gzip_SOURCES = lib/xfrm/test/pack.c
test_pack_gzip_LDADD = libxfrm.a $(LIBXFRM_LIBS)
test_pack_gzip_CPPFLAGS = $(AM_CPPFLAGS) -DDO_GZIP=1

LIBXFRM_TESTS += test_pack_gzip test_unpack_gzip
endif

if WITH_ZSTD
if HAVE_ZSTD_STREAM
libxfrm_a_SOURCES += lib/xfrm/src/zstd.c
libxfrm_a_CFLAGS += $(ZSTD_CFLAGS) -DWITH_ZSTD

test_pack_zstd_SOURCES = lib/xfrm/test/unpack.c
test_pack_zstd_LDADD = libxfrm.a $(ZSTD_LIBS)
test_pack_zstd_CPPFLAGS = $(AM_CPPFLAGS) -DDO_ZSTD=1

test_unpack_zstd_SOURCES = lib/xfrm/test/pack.c
test_unpack_zstd_LDADD = libxfrm.a $(LIBXFRM_LIBS)
test_unpack_zstd_CPPFLAGS = $(AM_CPPFLAGS) -DDO_ZSTD=1

LIBXFRM_TESTS += test_pack_zstd test_unpack_zstd
endif
endif

noinst_LIBRARIES += libxfrm.a

check_PROGRAMS += $(LIBXFRM_TESTS)
TESTS += $(LIBXFRM_TESTS)