home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / apps / science / readseq / makefile < prev    next >
Makefile  |  1992-12-30  |  3KB  |  112 lines

  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=
  25. #NCBI=/bio/mb/ncbi
  26. #
  27. OTHERLIBS=-lm
  28. LIB1=-lncbi
  29. LIB2=-lncbiobj
  30. LIB3=-lncbicdr
  31. LIB4=-lvibrant
  32. INCPATH=$(NCBI)/include
  33. LIBPATH=$(NCBI)/lib
  34. NCFLAGS=$(CFLAGS) -DNCBI -I$(INCPATH)
  35. NLDFLAGS=-I$(INCPATH) -L$(LIBPATH)
  36. NLIBS=$(LIB1) $(LIB2) $(OTHERLIBS)
  37.  
  38.  
  39. all: build test
  40.  
  41. build: $(SOURCES)
  42.     @echo "Compiling readseq..."
  43.     $(CC) $(CFLAGS) -o readseq readseq.c ureadseq.c
  44.  
  45. # if using NCBI, uncomment these lines in place of build: above
  46. #build: $(SOURCES)
  47. # @echo "Compiling readseq with NCBI toolkit support...";
  48. # $(CC) -o readseq $(NLDFLAGS) $(NCFLAGS) readseq.c ureadseq.c ureadasn.c $(NLIBS)
  49.  
  50. test: $(SOURCES) readseq
  51.     @echo ""
  52.     @echo "Test for general read/write of all chars:"
  53.     ./readseq -p alphabet.std -otest.alpha
  54.     -diff test.alpha alphabet.std
  55.  
  56.     @echo ""
  57.     @echo "Test for valid format conversions:"
  58.     ./readseq -v -p -f=ig   nucleic.std -otest.ig
  59.     ./readseq -v -p -f=gb   test.ig     -otest.gb
  60.     ./readseq -v -p -f=nbrf test.gb     -otest.nbrf
  61.     ./readseq -v -p -f=embl test.nbrf   -otest.embl
  62.     ./readseq -v -p -f=gcg  test.embl   -otest.gcg
  63.     ./readseq -v -p -f=strider test.gcg -otest.strider
  64.     ./readseq -v -p -f=fitch test.strider -otest.fitch
  65.     ./readseq -v -p -f=fasta test.fitch -otest.fasta
  66.     ./readseq -v -p -f=pir  test.fasta  -otest.pir
  67.     ./readseq -v -p -f=ig   test.pir    -otest.ig-b
  68.     -diff test.ig test.ig-b
  69.  
  70.     @echo ""
  71.     @echo "Test for multiple-sequence format conversions:"
  72.     ./readseq -p -f=ig    multi.std   -otest.m-ig
  73.     ./readseq -p -f=gb    test.m-ig   -otest.m-gb
  74.     ./readseq -p -f=nbrf  test.m-gb   -otest.m-nbrf
  75.     ./readseq -p -f=embl  test.m-nbrf -otest.m-embl
  76.     ./readseq -p -f=fasta test.m-embl -otest.m-fasta
  77.     ./readseq -p -f=pir   test.m-fasta -otest.m-pir
  78.     ./readseq -p -f=msf   test.m-pir  -otest.m-msf
  79.     ./readseq -p -f=paup  test.m-msf  -otest.m-paup
  80.     ./readseq -p -f=ig    test.m-paup -otest.m-ig-b
  81.     -diff test.m-ig test.m-ig-b
  82. #
  83. # if using NCBI, uncomment these lines
  84. # @echo ""
  85. # @echo "Test of NCBI ASN.1 conversions:"
  86. # ./readseq -p -f=asn test.m-ig  -otest.m-asn
  87. # ./readseq -p -f=ig  test.m-asn -otest.m-ig-c
  88. # -diff test.m-ig test.m-ig-c
  89. #
  90.     @echo ""
  91.     @echo "Expect differences in the header lines due to"
  92.     @echo "different format headers.  If any sequence lines"
  93.     @echo "differ, or if the checksums differ, there is a problem."
  94.     @echo "----------------------"
  95.     @echo ""
  96.     @echo "To clean up test files, command me:"
  97.     @echo "    make clean"
  98.  
  99.  
  100. clean:
  101.     rm -f *.o core test.*
  102.  
  103. shar:
  104.     @echo "shell archiving files..."
  105.     -rm -f readseq*.shar
  106.     mkdir readseqd
  107.     cp $(SOURCES) readseqd
  108.     cp $(DOCS) readseqd
  109.     shar -v readseqd > readseq.shar
  110.     rm -rf readseqd
  111.  
  112.