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
|
Description: build command line aligner
This patch ensures that 'ssw_test' is called 'ssw-align' in Debian
and also links against libssw.
Author: Sascha Steinbiss <satta@debian.org>
--- a/src/Makefile
+++ b/src/Makefile
@@ -5,7 +5,7 @@ AR ?= ar
#CXXFLAGS := $(CFLAGS)
LOBJS = ssw.o
LCPPOBJS = ssw_cpp.o
-PROG = ssw_test
+PROG = ssw-align
SOVERS=.0
LIB = libssw.so$(SOVERS)
STATICLIB = libssw.a
@@ -31,10 +31,11 @@ $(STATICLIB): $(LOBJS) $(LCPPOBJS)
ar rcs $@ $^
$(PROG): main.c kseq.h $(LIB) $(STATICLIB)
+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ main.c kseq.h -L. -lssw -lm -lz $(LDFLAGS)
$(EXAMPLE): example.c
-$(PROG) $(EXAMPLE): $(LOBJS)
+$(EXAMPLE): $(LOBJS)
$(CC) -o $@ $(filter-out %.h,$^) $(CPPFLAGS) $(CFLAGS) -lm -lz $(LDFLAGS)
$(EXAMPLE_CPP): example.cpp $(LOBJS) $(LCPPOBJS)
--- a/src/main.c
+++ b/src/main.c
@@ -297,7 +297,7 @@ int main (int argc, char * const argv[])
}
if (optind + 2 > argc) {
fprintf(stderr, "\n");
- fprintf(stderr, "Usage: ssw_test [options] ... <target.fasta> <query.fasta>(or <query.fastq>)\n");
+ fprintf(stderr, "Usage: %s [options] ... <target.fasta> <query.fasta>(or <query.fastq>)\n", argv[0]);
fprintf(stderr, "Options:\n");
fprintf(stderr, "\t-m N\tN is a positive integer for weight match in genome sequence alignment. [default: 2]\n");
fprintf(stderr, "\t-x N\tN is a positive integer. -N will be used as weight mismatch in genome sequence alignment. [default: 2]\n");
|