-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
66 lines (51 loc) · 2.14 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Makefile for Nonpareil
# @update Dec 16 2013
# @author Luis M. Rodriguez-R <lmrodriguez at gmail dot com>
include globals.mk
enveomics=enveomics/
universal=$(enveomics)universal.o
sqlite=$(enveomics)sqlite.o -lsqlite3
regex=$(enveomics)regex.o
go=$(enveomics)go.o $(regex) $(sqlite)
sequence=$(enveomics)sequence.o
multinode=$(enveomics)multinode.o
seqreader=$(enveomics)SeqReader.o
references=$(enveomics)References.o
hash=$(enveomics)Hash.o
kmercounter=$(enveomics)KmerCounter.o
ldflags=-lpthread -lz
np_objs=$(universal) $(multinode) $(sequence) $(seqreader) $(reader) $(kmercounter) $(references) $(hash) $(enveomics)nonpareil_mating.o $(enveomics)nonpareil_sampling.o
all: clean nonpareil nonpareil-mpi test release
enveomics:
cd $(enveomics) && $(MAKE) all
nonpareil-mpi:
cd $(enveomics) && $(MAKE) $@
$(mpicpp) nonpareil.cpp $(np_objs) $(ldflags) $(mpiflags) $(CPPFLAGS) -o $@
nonpareil:
cd $(enveomics) && $(MAKE) $@
$(cpp) nonpareil.cpp $(np_objs) $(ldflags) $(CPPFLAGS) -o $@
nuc_sampler:
cd $(enveomics) && $(MAKE) sequence
$(cpp) nuc_sampler.cpp $(universal) $(sequence) $(ldflags) $(CPPFLAGS) -o nuc_sampler
clean:
cd $(enveomics) && $(MAKE) clean
rm -f test/test.*.enve-* test/test.fast[aq] test/DELETE.np* nonpareil.np*
install:
if [ ! -d $(bindir) ] ; then mkdir -p $(bindir) ; fi
if [ ! -d $(mandir) ] ; then mkdir -p $(mandir) ; fi
if [ -e nonpareil ] ; then install -m 0755 nonpareil $(bindir)/ ; fi
if [ -e nonpareil-mpi ] ; then install -m 0755 nonpareil-mpi $(bindir)/ ; fi
cp docs/_build/man/nonpareil.1 $(mandir)/nonpareil.1
$(R) CMD INSTALL utils/Nonpareil
test: nonpareil
./test.bash
release: nonpareil
$(eval release=$(shell ./nonpareil -V | perl -pe 's/.*v//'))
$(eval version=$(shell echo $(release) | perl -pe 's/\.[^\.]+$$//'))
sed -i '' "s/^\(version = \)'.*'$$/\1'$(version)'/" docs/conf.py
sed -i '' "s/^\(release = \)'.*'$$/\1'$(release)'/" docs/conf.py
sed -i '' "s/^\(copyright = u'2013-\)[0-9]*/\1$(shell date +%Y)/" docs/conf.py
cd docs && $(MAKE) man
cp nonpareil binaries/MacOSX_Intel/nonpareil-$(release)
cp nonpareil-mpi binaries/MacOSX_Intel/nonpareil-mpi-$(release)
.PHONY: all clean install test release