-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.am
112 lines (87 loc) · 3.53 KB
/
Makefile.am
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
ACLOCAL_AMFLAGS=-I m4
AM_CPPFLAGS = -I$(srcdir)/include -I$(srcdir) $(JELLYFISH2_0_CFLAGS)
AM_CXXFLAGS = -Wall -g -O2 -std=c++0x
AM_LDFLAGS = $(STATIC_FLAGS)
LDADD = $(JELLYFISH2_0_LIBS)
# Yaggo automatic rules with silencing
V_YAGGO = $(V_YAGGO_$(V))
V_YAGGO_ = $(V_YAGGO_$(AM_DEFAULT_VERBOSITY))
V_YAGGO_0 = @echo " YAGGO " $@;
.yaggo.hpp:
@echo yaggo $< $@
$(V_YAGGO)$(YAGGO) --license $(srcdir)/header-license -o $@ $<
YAGGO_SOURCES = src/error_correct_reads_cmdline.hpp \
src/create_database_cmdline.hpp \
src/merge_mate_pairs_cmdline.hpp \
src/split_mate_pairs_cmdline.hpp
BUILT_SOURCES = $(YAGGO_SOURCES)
noinst_HEADERS = $(YAGGO_SOURCES)
CLEANFILES =
EXTRA_DIST =
bin_PROGRAMS = quorum_error_correct_reads quorum_create_database \
merge_mate_pairs split_mate_pairs
quorum_error_correct_reads_SOURCES = src/error_correct_reads.cc \
src/err_log.cc
quorum_create_database_SOURCES = src/create_database.cc
merge_mate_pairs_SOURCES = src/merge_mate_pairs.cc
split_mate_pairs_SOURCES = src/split_mate_pairs.cc
noinst_HEADERS += src/error_correct_reads.hpp \
src/error_correct_reads.hpp src/verbose_log.hpp \
src/kmer.hpp src/mer_database.hpp src/err_log.hpp
noinst_HEADERS += include/gzip_stream.hpp include/misc.hpp \
include/jflib/locks_pthread.hpp \
include/jflib/pool.hpp \
include/jflib/multiplexed_io.hpp
###############################
# Adapter database generation #
###############################
dist_data_DATA = data/adapter.jf
DISTCLEANFILES = data/adapter.jf
SUFFIXES = .jf .fa
.fa.jf:
$(AM_V_GEN)mkdir -p $(@D); $(JELLYFISH) count -m 24 -s 5k -C -t 10 -o $@ $<
perl_scripts = quorum
libs_scripts = $(patsubst %,.libs/%,$(perl_scripts))
bin_SCRIPTS = $(libs_scripts)
noinst_SCRIPTS = $(perl_scripts)
CLEANFILES += $(libs_scripts) $(perl_scripts)
EXTRA_DIST += $(patsubst %,src/%.in,$(perl_scripts))
if RELATIVE_PATHS
quorum_bindir=$$dir
else
quorum_bindir=$(bindir)
endif
if HAVE_RELATIVE_JF_PATH
quorum_jellyfish=$$dir/$(RELATIVE_JF_PATH)
local_quorum_jellyfish = $(shell realpath "$(bindir)/$(RELATIVE_JF_PATH)")
else
quorum_jellyfish=$(JELLYFISH)
local_quorum_jellyfish = $(quorum_jellyfish)
endif
inst_subst = sed -e 's|[@]JELLYFISH[@]|$(quorum_jellyfish)|g' \
-e 's|[@]bindir[@]|$(quorum_bindir)|g' \
-e 's|[@]JF_LIB_PATH[@]|$(JF_LIB_PATH)|g' \
-e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
-e 's|[@]JELLYFISH_VERSION[@]|$(JELLYFISH_VERSION)|g'
local_subst = sed -e 's|[@]JELLYFISH[@]|$(quorum_jellyfish)|g' \
-e 's|[@]bindir[@]|$(abs_builddir)|g' \
-e 's|[@]JF_LIB_PATH[@]|$(JF_LIB_PATH)|g' \
-e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
-e 's|[@]JELLYFISH_VERSION[@]|$(JELLYFISH_VERSION)|g'
.libs/%: src/%.in Makefile
@mkdir -p $(dir $@) && $(inst_subst) < $< > $@
%: src/%.in Makefile
$(AM_V_GEN)$(local_subst) < $< > $@ && chmod a+x $@
##############
# Unit tests #
##############
TESTS = all_tests
check_PROGRAMS = all_tests query_mer_database histo_mer_database
all_tests_SOURCES = unit_tests/test_mer_database.cc
all_tests_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir)/unit_tests/gtest/include -I$(srcdir)/unit_tests
all_tests_LDADD = libgtest_main.la $(LDADD)
noinst_HEADERS += unit_tests/test_misc.hpp
query_mer_database_SOURCES = src/query_mer_database.cc
histo_mer_database_SOURCES = src/histo_mer_database.cc
include gtest.mk
-include $(srcdir)/local.mk