-
Notifications
You must be signed in to change notification settings - Fork 90
/
Makefile.in
115 lines (92 loc) · 3.22 KB
/
Makefile.in
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
113
114
115
CXXFLAGS += -O3 -std=c++14 -Isrc -I@capnp@/include -I@mathinc@
CPPFLAGS += @amcppflags@
UNAME_S=$(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++
else
CXXFLAGS += -include src/mash/memcpyLink.h -Wl,--wrap=memcpy
CFLAGS += -include src/mash/memcpyLink.h
endif
SOURCES=\
src/mash/Command.cpp \
src/mash/CommandBounds.cpp \
src/mash/CommandContain.cpp \
src/mash/CommandDistance.cpp \
src/mash/CommandTaxScreen.cpp \
src/mash/CommandScreen.cpp \
src/mash/CommandTriangle.cpp \
src/mash/CommandFind.cpp \
src/mash/CommandInfo.cpp \
src/mash/CommandPaste.cpp \
src/mash/CommandSketch.cpp \
src/mash/CommandList.cpp \
src/mash/hash.cpp \
src/mash/HashList.cpp \
src/mash/HashPriorityQueue.cpp \
src/mash/HashSet.cpp \
src/mash/MinHashHeap.cpp \
src/mash/MurmurHash3.cpp \
src/mash/mash.cpp \
src/mash/Sketch.cpp \
src/mash/sketchParameterSetup.cpp \
OBJECTS=$(SOURCES:.cpp=.o) src/mash/capnp/MinHash.capnp.o
all : mash libmash.a
mash : libmash.a src/mash/memcpyWrap.o
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o mash src/mash/memcpyWrap.o libmash.a @capnp@/lib/libcapnp.a @capnp@/lib/libkj.a @mathlib@ -lstdc++ -lz -lm -lpthread
libmash.a : $(OBJECTS)
ar -cr libmash.a $(OBJECTS)
ranlib libmash.a
.SUFFIXES :
%.o : %.cpp src/mash/capnp/MinHash.capnp.h
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
%.o : %.c++
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
src/mash/memcpyWrap.o : src/mash/memcpyWrap.c
$(CC) $(CFLAGS) -c -o $@ $<
src/mash/capnp/MinHash.capnp.c++ src/mash/capnp/MinHash.capnp.h : src/mash/capnp/MinHash.capnp
cd src/mash/capnp;export PATH=@capnp@/bin/:${PATH};capnp compile -I @capnp@/include -oc++ MinHash.capnp
.PHONY: install-man install
install-man:
mkdir -p @prefix@/share/man/man1
cp `pwd`/doc/man/*.1 @prefix@/share/man/man1
install : mash install-man
mkdir -p @prefix@/bin/
mkdir -p @prefix@/lib/
mkdir -p @prefix@/include/
mkdir -p @prefix@/include/mash
mkdir -p @prefix@/include/mash/capnp
cp `pwd`/mash @prefix@/bin/
cp `pwd`/libmash.a @prefix@/lib/
cp `pwd`/src/mash/*.h @prefix@/include/mash/
cp `pwd`/src/mash/capnp/MinHash.capnp.h @prefix@/include/mash/capnp/
.PHONY: uninstall uninstall-man
uninstall: uninstall-man
rm -f @prefix@/bin/mash
rm -f @prefix@/lib/libmash.a
rm -rf @prefix@/include/mash
uninstall-man:
rm -f @prefix@/share/man/man1/mash*.1
clean :
-rm mash
-rm libmash.a
-rm src/mash/*.o
-rm src/mash/capnp/*.o
-rm src/mash/capnp/*.c++
-rm src/mash/capnp/*.h
.PHONY: test
test : testSketch testDist testScreen
testSketch : mash test/genomes.msh test/reads.msh
./mash info -d test/genomes.msh > test/genomes.json
./mash info -d test/reads.msh > test/reads.json
diff test/genomes.json test/ref/genomes.json
diff test/reads.json test/ref/reads.json
test/genomes.msh : mash
cd test ; ../mash sketch -o genomes.msh genome1.fna genome2.fna genome3.fna
test/reads.msh : mash
cd test ; ../mash sketch -r -I reads reads1.fastq reads2.fastq -o reads.msh
testDist : mash test/genomes.msh test/reads.msh
./mash dist test/genomes.msh test/reads.msh > test/genomes.dist
diff test/genomes.dist test/ref/genomes.dist
testScreen : mash test/genomes.msh
cd test ; ../mash screen genomes.msh reads1.fastq reads2.fastq > screen
diff test/screen test/ref/screen