-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
37 lines (30 loc) · 1.43 KB
/
Makefile
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
#Set inclusion paths here (if boost, bamtools, or args are installed outside your path)
INCLUDE_DIRS=-Irnaseqc -Irnaseqc/src -Irnaseqc/SeqLib -Irnaseqc/SeqLib/htslib/
#Set library paths here (if boost or bamtools are installed outside your path)
LIBRARY_PATHS=
#Set to 0 if you encounter linker errors regarding strings from the bamtools library
ABI=1
#Provide full paths here to .a archives for libraries which should be statically linked
STATIC_LIBS=
#List of remaining libraries that will be dynamically linked
LIBS=-lboost_filesystem -lboost_regex -lboost_system -lz -llzma -lbz2 -lpthread
CC=g++
STDLIB=-std=c++14
CFLAGS=-Wall $(STDLIB) -D_GLIBCXX_USE_CXX11_ABI=$(ABI) -O3
SOURCES=scrinvex.cpp
SRCDIR=src
OBJECTS=$(SOURCES:.cpp=.o)
SEQFLAGS=$(STDLIB) -D_GLIBCXX_USE_CXX11_ABI=$(ABI)
scrinvex: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file)) rnaseqc/rnaseqc.a rnaseqc/SeqLib/lib/libseqlib.a rnaseqc/SeqLib/lib/libhts.a
$(CC) -O3 $(LIBRARY_PATHS) -o $@ $^ $(STATIC_LIBS) $(LIBS)
%.o: %.cpp
$(CC) $(CFLAGS) -I. $(INCLUDE_DIRS) -c -o $@ $<
rnaseqc/SeqLib/lib/libseqlib.a rnaseqc/SeqLib/lib/libhts.a:
cd rnaseqc/SeqLib && ./configure && make CXXFLAGS="$(SEQFLAGS)" && make install
rnaseqc/rnaseqc.a:
cd rnaseqc && make lib ABI=$(ABI)
.PHONY: clean
clean:
rm $(wildcard $(SRCDIR)/*.o) || echo "Nothing to clean in scrinvex"
cd rnaseqc && make clean || echo "Nothing to clean in RNA-SeQC"
cd rnaseqc/SeqLib && make clean || echo "Nothing to clean in SeqLib"