Skip to content

Fix makefile #3

Merged
merged 5 commits into from
Oct 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
BINDIR ?= $(PREFIX)/bin
BIN = $(DESTDIR)/$(BINDIR)
# With pthreads
override CXXFLAGS+= -DMAXHITS=1000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream -Igzstream -O3 -m64 -march=native -g
override CXXFLAGS+= -DMAXHITS=1000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream -Igzstream -O3 -m64 $(EXTRA_CXXFLAGS)
# Without pthreads
#override CXXFLAGS+= -DMAXHITS=1000 -funroll-loops -Lsamtools -Isamtools -Lgzstream -Igzstream -O3 -m64 -march=native
#override CXXFLAGS+= -DMAXHITS=1000 -funroll-loops -Lsamtools -Isamtools -Lgzstream -Igzstream -O3 -m64 $(EXTRA_CXXFLAGS)

THREAD= -lpthread

Expand All @@ -14,15 +14,14 @@ all: bsmap
%.o:%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
bsmap: $(OBJS1)
(cd samtools; make)
(cd gzstream; make)
$(MAKE) -C samtools
$(MAKE) -C gzstream
$(CXX) $(CXXFLAGS) $^ -o $@ $(THREAD) -lbam -lz -lgzstream
rm -f *.o

clean:
rm -f *.o *~ bsmap
(cd samtools; make clean)
(cd gzstream; make clean)
$(MAKE) -C samtools clean
$(MAKE) -C gzstream clean
install:
install -d $(BIN)
install ./bsmap $(BIN)
Expand Down