File: makefile

package info (click to toggle)
parsinsert 1.04-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 105,628 kB
  • sloc: cpp: 8,678; makefile: 108; sh: 15
file content (65 lines) | stat: -rw-r--r-- 1,725 bytes parent folder | download | duplicates (3)
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
#
# Makefie for ParsInsert
#
# ParsInsert efficiently produces both a phylogenetic tree and taxonomic classification 
# for sequences for microbial community sequence analysis. 
#
# This is a C++ implementation of the Parsimonious Insertion algorithm.
#
PROGRAM = ParsInsert
OBJECTS = AttrList.o Knox_Stddef.o PNode.o SeqList.o Taxonomy.o ParsInsert.o

CXX     ?= g++
INCLUDES =
LIBS     = -lm -lc

.SUFFIXES:	.o .cpp

.cpp.o:
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

all:    $(PROGRAM) 

clean: 
	rm -f $(PROGRAM) $(OBJECTS) *.fasta *.log *.results *.tree

TEST_OBJECTS = PNode.o AttrList.o Knox_Stddef.o Test.o
test:  $(TEST_OBJECTS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o Test $(TEST_OBJECTS) $(LIBS) $(LDFLAGS)

Knox_Stddef.o: Knox_Stddef.cpp Knox_Stddef.h

$(PROGRAM):	$(OBJECTS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(PROGRAM) $(OBJECTS) $(LIBS) $(LDFLAGS)

TEST_DIR = ./TestData
test_short = short1000_NAST
test_set = set1000

TAXONOMY = $(TEST_DIR)/rdp.taxonomy
TREE     = $(TEST_DIR)/core_rdp.ntree
TREE_SEQ = $(TEST_DIR)/core_rdp.fasta

# create compressed version of the release
RELEASE_VER = 1.04
RELEASE:
	tar -czf ../ParsInsert.$(RELEASE_VER).tgz * 

# use simple scoring function (-d0), threshold cutoff at 80% (-c80), only display best location (-n1)
test_options = -d0 -c80 -n1

TEST: $(PROGRAM)
	rm -f $(test_set).fasta
	cp TestData/$(test_set).fasta .
	./$(PROGRAM)  		$(test_options) \
						-m $(TEST_DIR)/lanemask.txt\
						-x $(TAXONOMY) \
						-l $(test_set).log \
						-o $(test_set).results \
						-t $(TREE) \
						-s $(TREE_SEQ) \
						$(test_set).fasta 
	diff $(test_set).results TestData/$(test_set).results
	echo Differences:
	diff $(test_set).results TestData/$(test_set).results | wc -l