File tree 4 files changed +37
-4
lines changed
4 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ all: quicktree
24
24
quicktree : $(QUICKTREEOBJ )
25
25
$(CC ) $(LFLAGS ) -o $@ $(QUICKTREEOBJ ) -lm
26
26
27
- $(OBJ ) /quicktree.o : $(SRC ) /quicktree.c
27
+ $(OBJ ) /quicktree.o : $(SRC ) /quicktree.c $( INC ) /version.h
28
28
$(CC ) $(CFLAGS ) -o $(OBJ ) /quicktree.o $(SRC ) /quicktree.c
29
29
30
30
$(OBJ ) /align.o : $(SRC ) /align.c $(INC ) /align.h
Original file line number Diff line number Diff line change
1
+ /**********************************************************************
2
+ * File: version.h
3
+ * Author: Torsten Seemann
4
+ *-------------------------------------------------------------------
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ *-------------------------------------------------------------------
15
+ * NOTES:
16
+ * This file contains general utiliy functions used throughout the
17
+ * application, such as those for memory management and error
18
+ * messaging. I have used it as a place to put other general stuff
19
+ * until I have somewhere better to put it.
20
+ **********************************************************************/
21
+ #ifndef _VERSION
22
+ #define _VERSION
23
+
24
+ #define VERSION_MAJOR 2
25
+ #define VERSION_MINOR 0
26
+
27
+ #endif
Original file line number Diff line number Diff line change 27
27
#include "buildtree.h"
28
28
#include "distancemat.h"
29
29
#include "tree.h"
30
-
30
+ #include "version.h"
31
31
32
32
/********************* command-line options * ************************/
33
33
@@ -44,7 +44,8 @@ Advanced options :\n\
44
44
-kimura : Use the kimura translation for pairwise distances\n\
45
45
(ignored for distance matrix inputs)\n\
46
46
-boot <n> : Calcuate bootstrap values with n iterations\n\
47
- (ignored for distance matrix outputs)\n\n\
47
+ (ignored for distance matrix outputs)\n\
48
+ -v : print version and exit\n\n\
48
49
*Use sreformat, part of the HMMer package to convert your alignment to Stockholm format\n" ;
49
50
50
51
static struct Option options [] = {
@@ -53,7 +54,8 @@ static struct Option options[] = {
53
54
{ "-upgma" , NO_ARGS },
54
55
{ "-kimura" , NO_ARGS },
55
56
{ "-boot" , INT_ARG },
56
- { "-h" , NO_ARGS }
57
+ { "-h" , NO_ARGS },
58
+ { "-v" , NO_ARGS },
57
59
};
58
60
59
61
static unsigned int use_kimura = 0 ;
@@ -191,6 +193,10 @@ int main (int argc, char *argv[]) {
191
193
fprintf ( stderr , "%s" , usage );
192
194
exit (0 );
193
195
}
196
+ else if (strcmp (optname , "-v" ) == 0 ) {
197
+ printf ( "quicktree %d.%d\n" , VERSION_MAJOR , VERSION_MINOR );
198
+ exit (0 );
199
+ }
194
200
}
195
201
196
202
if (argc - optindex != 1 ) {
You can’t perform that action at this time.
0 commit comments