-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
65 lines (55 loc) · 1.39 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
all: build/CMakeCache.txt run_make
.PHONY: all
# Run cmake if not yet done or if CMakeLists.txt has changed.
build/CMakeCache.txt: CMakeLists.txt
@echo "Running cmake"
@mkdir -p build
@cd build && cmake ..
run_make: build/CMakeCache.txt
@echo "Running make"
$(MAKE) -C build
.PHONY: run_make
update:
@touch src/CMakeLists.txt
@touch test/src/CMakeLists.txt
$(MAKE) -C build
.PHONY: update
unittest: update
@./test/bin/epa_test
.PHONY: test
clean:
@echo "Cleaning"
@rm -rf build
@rm -rf bin
@rm -rf test/bin
.PHONY: clean
#======================================
#=== Test commands follow ===
#======================================
EPABIN=./bin/epa-ng
TEST=test/data/lucas
TREE=$(TEST)/tree.newick
REF=$(TEST)/reference.fasta
QRY=$(TEST)/query.fasta.bfast
INFO=$(TEST)/infofile
BINFILE=$(TEST)/epa_binary_file
OUTDIR=/tmp/epa
BINARY_WRITE= -t $(TREE) -s $(REF) -B -w $(OUTDIR) --verbose $(F)
BINARY_READ=-b $(BINFILE) -q $(QRY) -w $(OUTDIR) -g 0.99 --verbose $(F)
NORM_TEST=-t $(TREE) -s $(REF) -q $(QRY) --model $(INFO) -w $(OUTDIR) --verbose $(F)
test: #update
mkdir -p $(OUTDIR)
rm -f $(OUTDIR)/*
$(EPABIN) $(NORM_TEST) --threads 4
.PHONY: test
bintest: update
mkdir -p $(OUTDIR)
rm -f $(OUTDIR)/*
$(EPABIN) $(BINARY_WRITE)
$(EPABIN) $(BINARY_READ)
.PHONY: bintest
mpi_test: #update
mkdir -p $(OUTDIR)
rm -f $(OUTDIR)/*
mpirun -n 2 $(EPABIN) $(NORM_TEST) --threads 2
.PHONY: mpi_test