Skip to content

Commit ce461fa

Browse files
Makefile.am: ensuring that the BAM-related sources are only used if --enable-hts is specified to configure
1 parent bf76df7 commit ce461fa

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

Makefile.am

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ ACLOCAL_AMFLAGS = -I m4
1818

1919
SUBDIRS := src/smithlab_cpp
2020
install installdirs: SUBDIRS := $(filter-out src/smithlab_cpp, $(SUBDIRS))
21-
AM_CPPFLAGS = -I $(top_srcdir)/src/smithlab_cpp -I $(top_srcdir)/src/bamxx
22-
AM_CPPFLAGS += -Wall -Wextra -Wpedantic -Wno-unknown-attributes
21+
AM_CPPFLAGS = -I $(top_srcdir)/src/smithlab_cpp
22+
if ENABLE_HTS
23+
AM_CPPFLAGS += -I $(top_srcdir)/src/bamxx
24+
endif
2325

24-
CXXFLAGS = -O2 -DNDEBUG # default w/ optimization; careful for math
26+
AM_CPPFLAGS += -Wall -Wextra -Wpedantic -Wno-unknown-attributes
27+
if ENABLE_HTS
28+
AM_CPPFLAGS += -DHAVE_HTSLIB
29+
endif
2530

2631
EXTRA_DIST = \
2732
README.md \
@@ -47,9 +52,6 @@ TEST_EXTENSIONS = .test
4752
LDADD = src/smithlab_cpp/libsmithlab_cpp.a
4853

4954
bin_PROGRAMS = preseq
50-
if ENABLE_HTS
51-
AM_CPPFLAGS += -DHAVE_HTSLIB
52-
endif
5355

5456
preseq_SOURCES = \
5557
src/preseq.cpp \
@@ -63,14 +65,18 @@ preseq_SOURCES = \
6365
src/lc_extrap.cpp \
6466
src/bound_pop.hpp \
6567
src/bound_pop.cpp \
66-
src/bamxx/bamxx.hpp \
6768
src/pop_size.hpp \
6869
src/pop_size.cpp \
6970
src/continued_fraction.hpp \
7071
src/continued_fraction.cpp \
71-
src/bam_record_utils.hpp \
72-
src/bam_record_utils.cpp \
7372
src/load_data_for_complexity.hpp \
7473
src/load_data_for_complexity.cpp \
7574
src/moment_sequence.hpp \
7675
src/moment_sequence.cpp
76+
77+
if ENABLE_HTS
78+
preseq_SOURCES += \
79+
src/bamxx/bamxx.hpp \
80+
src/bam_record_utils.hpp \
81+
src/bam_record_utils.cpp
82+
endif

0 commit comments

Comments
 (0)