-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
47 lines (35 loc) · 1.1 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
38
39
40
41
42
43
44
45
46
47
#modied from htslib makefile
FLAGS=-O3
CXXFLAGS += $(FLAGS)
CXXSRC = $(wildcard *.cpp)
OBJ = $(CXXSRC:.cpp=.o)
all: ngsRelate
# Adjust $(HTSSRC) to point to your top-level htslib directory
ifdef HTSSRC
$(info HTSSRC defined)
HTS_INCDIR=$(realpath $(HTSSRC))
HTS_LIBDIR=$(realpath $(HTSSRC))/libhts.a
else
$(info HTSSRC not defined, assuming systemwide installation -lhts)
endif
.PHONY: misc clean test
-include $(OBJ:.o=.d)
ifdef HTSSRC
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $*.cpp -I$(HTS_INCDIR) -D__WITH_BCF__ ## -DDB_EMIS -DDB_MP
$(CXX) -MM $(CXXFLAGS) $*.cpp -I$(HTS_INCDIR) -D__WITH_BCF__ >$*.d
ngsRelate: $(OBJ)
$(CXX) $(FLAGS) -o ngsRelate *.o $(HTS_LIBDIR) -lz -lm -lbz2 -llzma -lpthread -lcurl -D__WITH_BCF__
else
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) -D__WITH_BCF__ $*.cpp
$(CXX) -MM $(CXXFLAGS) -D__WITH_BCF__ $*.cpp >$*.d
ngsRelate: $(OBJ)
$(CXX) $(FLAGS) -o ngsRelate *.o -lz -lpthread -lhts -lbz2 -llzma
endif
clean:
rm -f *.o *.d ngsRelate *~
.PHONY: all clean install install-all install-misc misc test
test:
echo "Only subset of analyses is being tested"
cd test;./testAll.sh ../ngsRelate