JPRED-2 Add sources of all binaries (except alscript) to Git
[jpred.git] / sources / readseq / Make.ncbi
1 #
2 # Unix Makefile for readseq
3 # to use, command me:
4 #  %  make       -- or --
5 #  %  make CC=your-c-compiler-name
6 #
7
8 # pick an ANSI C compiler (the default Sun CC is not ANSI)
9 CC=gcc  # Gnu C Compiler
10 #CC=cc  # SGI Irix
11 #CC=vcc # some DEC Ultrix
12
13 CFLAGS=
14 #CFLAGS= -DSMALLCHECKSUM  # if you prefer to use a GCG-standard 13 bit checksum
15 #    instead of a full 32 bit checksum. This may enhance compatibility w/ GCG software
16
17 SOURCES= readseq.c ureadseq.c ureadseq.h ureadasn.c
18 DOCS= Readme readseq.help Formats Stdfiles Makefile Make.com add.gdemenu *.std
19
20
21 # NCBI toolkit support for ASN.1 reader
22
23 # this is path to NCBI toolkit, you must set for your system:
24 NCBI=/bio/mb/ncbi
25 #
26 OTHERLIBS=-lm
27 LIB1=-lncbi
28 LIB2=-lncbiobj
29 LIB3=-lncbicdr
30 LIB4=-lvibrant
31 INCPATH=$(NCBI)/include
32 LIBPATH=$(NCBI)/lib
33 NCFLAGS=$(CFLAGS) -DNCBI -I$(INCPATH)
34 NLDFLAGS=-I$(INCPATH) -L$(LIBPATH)
35 NLIBS=$(LIB1) $(LIB2) $(OTHERLIBS)
36
37
38 all: build test
39
40 #build: $(SOURCES)
41 #       @echo "Compiling readseq..."
42 #       $(CC) $(CFLAGS) -o readseq readseq.c ureadseq.c
43
44 # if using NCBI, uncomment these lines in place of build: above
45 build: $(SOURCES)
46         @echo "Compiling readseq with NCBI toolkit support...";
47         $(CC) -o readseq $(NLDFLAGS) $(NCFLAGS) readseq.c ureadseq.c ureadasn.c $(NLIBS)
48
49 test: $(SOURCES) readseq
50         @echo ""
51         @echo "Test for general read/write of all chars:"
52         ./readseq -p alphabet.std -otest.alpha
53         -diff test.alpha alphabet.std
54
55         @echo ""
56         @echo "Test for valid format conversions:"
57         ./readseq -v -p -f=ig   nucleic.std -otest.ig
58         ./readseq -v -p -f=gb   test.ig     -otest.gb
59         ./readseq -v -p -f=nbrf test.gb     -otest.nbrf
60         ./readseq -v -p -f=embl test.nbrf   -otest.embl
61         ./readseq -v -p -f=gcg  test.embl   -otest.gcg
62         ./readseq -v -p -f=strider test.gcg -otest.strider
63         ./readseq -v -p -f=fitch test.strider -otest.fitch
64         ./readseq -v -p -f=fasta test.fitch -otest.fasta
65         ./readseq -v -p -f=pir  test.fasta  -otest.pir
66         ./readseq -v -p -f=ig   test.pir    -otest.ig-b
67         -diff test.ig test.ig-b
68
69         @echo ""
70         @echo "Test for multiple-sequence format conversions:"
71         ./readseq -p -f=ig    multi.std   -otest.m-ig
72         ./readseq -p -f=gb    test.m-ig   -otest.m-gb
73         ./readseq -p -f=nbrf  test.m-gb   -otest.m-nbrf
74         ./readseq -p -f=embl  test.m-nbrf -otest.m-embl
75         ./readseq -p -f=fasta test.m-embl -otest.m-fasta
76         ./readseq -p -f=pir   test.m-fasta -otest.m-pir
77         ./readseq -p -f=msf   test.m-pir  -otest.m-msf
78         ./readseq -p -f=paup  test.m-msf  -otest.m-paup
79         ./readseq -p -f=ig    test.m-paup -otest.m-ig-b
80         -diff test.m-ig test.m-ig-b
81 #
82 # if using NCBI, uncomment these lines
83         @echo ""
84         @echo "Test of NCBI ASN.1 conversions:"
85         ./readseq -p -f=asn test.m-ig  -otest.m-asn
86         ./readseq -p -f=ig  test.m-asn -otest.m-ig-c
87         -diff test.m-ig test.m-ig-c
88 #
89         @echo ""
90         @echo "Expect differences in the header lines due to"
91         @echo "different format headers.  If any sequence lines"
92         @echo "differ, or if the checksums differ, there is a problem."
93         @echo "----------------------"
94         @echo ""
95         @echo "To clean up test files, command me:"
96         @echo "    make clean"
97
98
99 clean:
100         rm -f *.o core test.*
101
102 shar:
103         @echo "shell archiving files..."
104         -rm -f readseq*.shar
105         mkdir readseqd
106         cp $(SOURCES) readseqd
107         cp $(DOCS) readseqd
108         shar -v readseqd > readseq.shar
109         rm -rf readseqd
110