Change-Id: Ia534012f4b01cd4ffc2e3f06d8b89a5ddfaf3608 Signed-off-by: Tim Burke <tim.burke@gmail.com>
95 lines
3.1 KiB
Makefile
95 lines
3.1 KiB
Makefile
# Top-level liberasurecode automake configuration
|
|
SUBDIRS = src test doc
|
|
|
|
EXTRA_DIST = autogen.sh get_flags_from_cpuid.c
|
|
|
|
INCLUDE = -I$(abs_top_builddir)/include \
|
|
-I$(abs_top_builddir)/include/erasurecode \
|
|
-I$(abs_top_builddir)/include/xor_codes
|
|
|
|
AM_CPPFLAGS = $(CPPFLAGS) $(INCLUDE)
|
|
AM_CPPFLAGS += -Werror -Wall
|
|
|
|
AM_CFLAGS = -fPIC $(AM_CPPFLAGS) @GCOV_FLAGS@ -L/usr/local/lib
|
|
|
|
thisincludedir = $(includedir)/liberasurecode
|
|
thisinclude_HEADERS = \
|
|
include/erasurecode/alg_sig.h \
|
|
include/erasurecode/erasurecode.h \
|
|
include/erasurecode/erasurecode_backend.h \
|
|
include/erasurecode/erasurecode_helpers.h \
|
|
include/erasurecode/erasurecode_helpers_ext.h \
|
|
include/erasurecode/erasurecode_log.h \
|
|
include/erasurecode/erasurecode_preprocessing.h \
|
|
include/erasurecode/erasurecode_postprocessing.h \
|
|
include/erasurecode/erasurecode_stdinc.h \
|
|
include/erasurecode/erasurecode_version.h \
|
|
include/erasurecode/list.h \
|
|
include/xor_codes/xor_hd_code_defs.h \
|
|
include/xor_codes/xor_code.h \
|
|
include/config_liberasurecode.h \
|
|
include/rs_vand/rs_galois.h \
|
|
include/rs_vand/liberasurecode_rs_vand.h
|
|
|
|
pkgconfig_DATA = erasurecode-$(LIBERASURECODE_API_VERSION).pc
|
|
|
|
install-exec-hook:
|
|
-(mkdir -p $(DESTDIR)$(includedir) && \
|
|
cd $(DESTDIR)$(includedir) && \
|
|
rm -f erasurecode.h erasurecode_version.h \
|
|
erasurecode_stdinc.h erasurecode_helpers.h \
|
|
config_liberasurecode.h && \
|
|
$(LN_S) liberasurecode/erasurecode.h && \
|
|
$(LN_S) liberasurecode/erasurecode_version.h && \
|
|
$(LN_S) liberasurecode/erasurecode_stdinc.h && \
|
|
$(LN_S) liberasurecode/erasurecode_helpers.h && \
|
|
$(LN_S) liberasurecode/config_liberasurecode.h)
|
|
|
|
test: check
|
|
@./test/liberasurecode_test
|
|
@./test/liberasurecode_threaded_test
|
|
@./test/alg_sig_test
|
|
@./test/test_xor_hd_code
|
|
@./test/libec_slap
|
|
|
|
LIBTOOL_COMMAND = $(LIBTOOL) --mode execute
|
|
MEMCHECK_EXEC_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=memcheck \
|
|
--error-exitcode=1 --leak-check=yes --track-fds=yes \
|
|
--malloc-fill=A5 --free-fill=DE --fullpath-after=. --trace-children=yes
|
|
|
|
memcheck-test: check
|
|
@$(MEMCHECK_EXEC_COMMAND) ./test/alg_sig_test
|
|
@$(MEMCHECK_EXEC_COMMAND) ./test/liberasurecode_test
|
|
@$(MEMCHECK_EXEC_COMMAND) ./test/liberasurecode_threaded_test
|
|
@$(MEMCHECK_EXEC_COMMAND) ./test/test_xor_hd_code
|
|
@$(MEMCHECK_EXEC_COMMAND) ./test/libec_slap
|
|
|
|
HELGRIND_EXEC_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=helgrind \
|
|
--error-exitcode=1 --fullpath-after=. --trace-children=yes
|
|
|
|
helgrind-test: check
|
|
@$(HELGRIND_EXEC_COMMAND) ./test/liberasurecode_threaded_test
|
|
|
|
check-symbols: all
|
|
@./check-symbols.sh check
|
|
|
|
check-headers:
|
|
@find include -name '*.h' | xargs -L 1 gcc -Werror -I include -I include/erasurecode
|
|
|
|
check-format:
|
|
clang-format-18 --version
|
|
git clang-format-18 --binary `which clang-format-18` --diff 76a551dc -- src include
|
|
|
|
format:
|
|
clang-format-18 --version
|
|
git clang-format-18 --binary `which clang-format-18` 76a551dc -- src include
|
|
|
|
CLEANFILES = cscope.in.out cscope.out cscope.po.out
|
|
|
|
.PHONY: cscope
|
|
cscope:
|
|
find src include -name "*.[ch]" > cscope.files
|
|
cscope -q -b
|
|
|
|
MOSTLYCLEANFILES = *.gcda *.gcno *.gcov
|