@@ -81,11 +81,12 @@ CXX=g++
81
81
COMPILE.cpp = $(CXX ) $(CPPFLAGS ) $(SVNREV ) $(DBDIR ) $(TEST_UPDATE_DB ) -c
82
82
83
83
84
- .PHONY : all clean install release
84
+ .PHONY : all clean install release stxtyper test
85
85
86
- BINARIES = amr_report amrfinder amrfinder_index amrfinder_update fasta_check fasta_extract fasta2parts gff_check dna_mutation
86
+ BINARIES = amr_report amrfinder amrfinder_index amrfinder_update fasta_check \
87
+ fasta_extract fasta2parts gff_check dna_mutation mutate
87
88
88
- all : $(BINARIES )
89
+ all : $(BINARIES ) stxtyper
89
90
90
91
release : clean
91
92
svnversion . > version.txt
@@ -95,18 +96,19 @@ common.o: common.hpp common.inc
95
96
curl_easy.o : curl_easy.hpp common.hpp common.inc
96
97
gff.o : gff.hpp common.hpp common.inc
97
98
alignment.o : alignment.hpp alignment.hpp common.inc
99
+ seq.o : seq.hpp common.hpp common.inc
98
100
99
- amr_report.o : common.hpp common.inc gff.hpp alignment.hpp
101
+ amr_report.o : common.hpp common.inc gff.hpp alignment.hpp tsv.hpp columns.hpp version.txt
100
102
amr_reportOBJS =amr_report.o common.o gff.o alignment.o
101
103
amr_report : $(amr_reportOBJS )
102
104
$(CXX ) $(LDFLAGS ) -o $@ $(amr_reportOBJS )
103
105
104
- amrfinder.o : common.hpp common.inc gff.hpp
106
+ amrfinder.o : common.hpp common.inc gff.hpp tsv.hpp columns.hpp version.txt
105
107
amrfinderOBJS =amrfinder.o common.o gff.o tsv.o
106
108
amrfinder : $(amrfinderOBJS )
107
109
$(CXX ) $(LDFLAGS ) -o $@ $(amrfinderOBJS ) -pthread $(DBDIR )
108
110
109
- amrfinder_update.o : common.hpp common.inc
111
+ amrfinder_update.o : common.hpp common.inc curl_easy.hpp version.txt
110
112
amrfinder_updateOBJS =amrfinder_update.o common.o curl_easy.o
111
113
amrfinder_update : $(amrfinder_updateOBJS )
112
114
@if [ " $( TEST_UPDATE) " != " " ] ; \
@@ -115,69 +117,84 @@ amrfinder_update: $(amrfinder_updateOBJS)
115
117
fi # make sure the next make command rebuilds amrfinder_update
116
118
$(CXX ) $(LDFLAGS ) -o $@ $(amrfinder_updateOBJS ) -lcurl
117
119
118
- amrfinder_index.o : common.hpp common.inc
120
+ amrfinder_index.o : common.hpp common.inc version.txt
119
121
amrfinder_indexOBJS =amrfinder_index.o common.o
120
122
amrfinder_index : $(amrfinder_indexOBJS )
121
123
$(CXX ) $(LDFLAGS ) -o $@ $(amrfinder_indexOBJS )
122
124
123
- fasta_check.o : common.hpp common.inc
125
+ fasta_check.o : common.hpp common.inc version.txt
124
126
fasta_checkOBJS =fasta_check.o common.o
125
127
fasta_check : $(fasta_checkOBJS )
126
128
$(CXX ) $(LDFLAGS ) -o $@ $(fasta_checkOBJS )
127
129
128
- fasta_extract.o : common.hpp common.inc
130
+ fasta_extract.o : common.hpp common.inc version.txt
129
131
fasta_extractOBJS =fasta_extract.o common.o
130
132
fasta_extract : $(fasta_extractOBJS )
131
133
$(CXX ) $(LDFLAGS ) -o $@ $(fasta_extractOBJS )
132
134
133
- fasta2parts.o : common.hpp common.inc
135
+ fasta2parts.o : common.hpp common.inc version.txt
134
136
fasta2partsOBJS =fasta2parts.o common.o
135
137
fasta2parts : $(fasta2partsOBJS )
136
138
$(CXX ) $(LDFLAGS ) -o $@ $(fasta2partsOBJS )
137
139
138
- gff_check.o : common.hpp common.inc gff.hpp
140
+ gff_check.o : common.hpp common.inc gff.hpp version.txt
139
141
gff_checkOBJS =gff_check.o common.o gff.o
140
142
gff_check : $(gff_checkOBJS )
141
143
$(CXX ) $(LDFLAGS ) -o $@ $(gff_checkOBJS )
142
144
143
- dna_mutation.o : common.hpp common.inc alignment.hpp
145
+ dna_mutation.o : common.hpp common.inc alignment.hpp tsv.hpp columns.hpp version.txt
144
146
dna_mutationOBJS =dna_mutation.o common.o alignment.o
145
147
dna_mutation : $(dna_mutationOBJS )
146
148
$(CXX ) $(LDFLAGS ) -o $@ $(dna_mutationOBJS )
147
149
150
+ mutate.o : common.hpp common.inc alignment.hpp seq.hpp version.txt
151
+ mutateOBJS =mutate.o common.o alignment.o seq.o
152
+ mutate : $(mutateOBJS )
153
+ $(CXX ) -o $@ $(mutateOBJS )
148
154
155
+ stxtyper :
156
+ $(MAKE ) -C stx
149
157
150
158
clean :
151
159
rm -f * .o
152
160
rm -f $(BINARIES )
161
+ $(MAKE ) -C stx clean
153
162
154
163
install :
155
164
@if [ ! -e $( DESTDIR) $( bindir) ]; \
156
165
then \
157
166
mkdir -p $(DESTDIR )$(bindir ) ; \
158
167
fi
159
168
$(INSTALL ) $(BINARIES ) $(DESTDIR )$(bindir )
169
+ make -C stx install PREFIX=$(PREFIX ) bindir=$(bindir )
160
170
161
171
# amrfinder binaries for github binary release
162
172
GITHUB_FILE =amrfinder_binaries_v$(VERSION_STRING )
163
173
GITHUB_FILES = test_amrfinder.sh test_*.expected test_*.fa test_*.gff $(BINARIES )
174
+
164
175
github_binaries :
165
176
@if [ ! -e version.txt ]; \
166
177
then \
167
178
echo >&2 " version.txt required to make a distribution file" ; \
168
179
false ; \
169
180
fi
170
181
# first recompile amrfinder.o to pick up the new version info
171
- rm amrfinder.o amrfinder
172
- make
182
+ # and remove leaky NCBI paths
183
+ make clean
184
+ make all CXX=/usr/bin/g++ LD_RUN_PATH=
173
185
mkdir $(GITHUB_FILE)
174
186
echo $(VERSION_STRING) > $(GITHUB_FILE)/version.txt
175
187
cp $(GITHUB_FILES) $(GITHUB_FILE)
188
+ make -C stx
189
+ make -C stx install INSTALL_DIR=../$(GITHUB_FILE)/stx CXX=/usr/bin/g++ LD_RUN_PATH=
190
+ cp stx/test_stxtyper.sh stx/version.txt $(GITHUB_FILE)/stx
191
+ mkdir $(GITHUB_FILE)/stx/test
192
+ cp -R stx/test/*.fa stx/test/*.expected $(GITHUB_FILE)/stx/test
176
193
if [ -e $(GITHUB_FILE).tar.gz ]; then rm $(GITHUB_FILE).tar.gz; fi
177
- cd $(GITHUB_FILE); tar cvfz ../$(GITHUB_FILE).tar.gz *
178
- # tar cvfz $(GITHUB_FILE).tar.gz $(GITHUB_FILE)/*
194
+ cd $(GITHUB_FILE); ln -s stx/stxtyper .; tar cvfz ../$(GITHUB_FILE).tar.gz *
179
195
rm -r $(GITHUB_FILE)/*
180
196
rmdir $(GITHUB_FILE)
181
197
182
- test : $(DISTFILES ) Makefile * .cpp * .hpp * .inc test_dna.fa test_prot.fa test_prot.gff test_dna.fa test_dna.expected test_prot.expected test_both.expected
198
+ test : $(DISTFILES ) Makefile * .cpp * .hpp * .inc test_dna.fa test_prot.fa test_prot.gff test_dna.fa test_dna.expected test_prot.expected test_both.expected
199
+ make -C stx test
183
200
./test_amrfinder.sh
0 commit comments