summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 4212e8f30cb1d2129f5317bbddc9160a8f78b2c9 (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
ACLOCAL_AMFLAGS = -I m4
noinst_PROGRAMS=test_xor_hd_code alg_sig_test
AM_CPPFLAGS=-I./ -I../include -I/usr/local/include/jerasure
if DEBUG
AM_CFLAGS = -g3 -O0
else
AM_CFLAGS = -O2
endif
AM_CFLAGS += $(SIMD_FLAGS) -fPIC $(AM_CPPFLAGS) -L/usr/local/lib
VALGRIND_EXEC_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE --fullpath-after=.
include_HEADERS = include/xor_hd_code_defs.h include/xor_code.h include/alg_sig.h
lib_LTLIBRARIES =liberasurecode.la
liberasurecode_la_SOURCES =\
                            src/alg_sig.c \
                            src/crc32.c \
                            src/xor_code.c \
                            src/xor_hd_code.c
liberasurecode_la_ADDLIB = -lgf_complete -lJerasure

noinst_HEADERS = tests/test_xor_hd_code.h

test_xor_hd_code_SOURCES = tests/test_xor_hd_code.c tests/test_xor_hd_code.h
test_xor_hd_code_CPPFLAGS = -I./tests
test_xor_hd_code_LDFLAGS = -static -lerasurecode -lgf_complete
check_PROGRAMS = test_xor_hd_code

alg_sig_test_SOURCES = tests/alg_sig_test.c
alg_sig_test_CPPFLAGS = -I./tests
alg_sig_test_LDFLAGS = -static -lerasurecode -lgf_complete -lJerasure
check_PROGRAMS += alg_sig_test

test: check
	@./alg_sig_test
	@./test_xor_hd_code

valgrind-test: check
	@$(VALGRIND_EXEC_COMMAND) ./alg_sig_test
	@$(VALGRIND_EXEC_COMMAND) ./test_xor_hd_code