]> git.donarmstrong.com Git - samtools.git/commitdiff
* update Makefile
authorHeng Li <lh3@live.co.uk>
Fri, 12 Jun 2009 13:50:53 +0000 (13:50 +0000)
committerHeng Li <lh3@live.co.uk>
Fri, 12 Jun 2009 13:50:53 +0000 (13:50 +0000)
 * update INSTALL instruction

INSTALL
Makefile
misc/Makefile
zlib/Makefile

diff --git a/INSTALL b/INSTALL
index faa3eaf10d66354329abd106c4f27d4230f8756c..f202463b76f788401442d6f9fb29d7ea7a5e429d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,24 @@
-Compiling samtools requires the zlib library <http://www.zlib.net/>;
-compiling the alignment viewer further requires the GNU ncurses library
-<http://www.gnu.org/software/ncurses/>.
-
-Please type `./configure; make' to compile samtools. If it fails, try
-`make -f Makefile.generic'. If the compilation still fails due to errors
-in RAZF or the lack of ncurses, try `make -f Makefile.lite' to disable
-the alignment viewer and the RAZF-enhanced FASTA indexer.
+System Requirements
+===================
+
+Most of SAMtools functionality only depends on zlib which is included in
+this source code package. Compiling the alignment viewer further
+requires the GNU ncurses library <http://www.gnu.org/software/ncurses/>,
+which comes with Mac OS X and most of the modern Linux/Unix
+distributions. If you do not have this library installed, you can still
+compile the rest of SAMtools by manually modifying two lines in Makefile
+as is described in the Makefile.
+
+
+Compilation
+===========
+
+Type `make' to compile samtools.
+
+
+Installation
+============
+
+Simply copy `samtools' and other executables/scripts in `misc' to a
+location you want (e.g. a directory in your $PATH). No further
+configurations are required.
index 6bf4227753c1e29844701fa897d631fa6f3b39d8..86612c1b524b7185d9714b839067875b8bc85aa7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,17 @@
 CC=                    gcc
 CXX=           g++
-CFLAGS=                -g -Wall #-O2 -m64 #-arch ppc
+CFLAGS=                -g -Wall -O2 #-m64 #-arch ppc
 CXXFLAGS=      $(CFLAGS)
-DFLAGS=                -D_IOLIB=2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 #-D_NO_RAZF #-D_NO_CURSES
+### For ncurses: please apply `-D_NO_CURSES' if you do not have ncurses installed
+DFLAGS=                -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 #-D_NO_CURSES
 OBJS=          bam.o bam_import.o bam_pileup.o bam_lpileup.o bam_sort.o bam_index.o \
                        razf.o bgzf.o faidx.o bam_tview.o bam_maqcns.o bam_aux.o bam_plcmd.o \
                        bam_mate.o bam_rmdup.o glf.o bam_stat.o kstring.o bam_md.o sam.o sam_view.o \
                        bam_rmdupse.o
 PROG=          razip bgzip samtools
-INCLUDES=      
-LIBS=          -lm -lz
-SUBDIRS=       . misc
+INCLUDES=      -Izlib
+LIBS=          -lm -Lzlib -lz
+SUBDIRS=       zlib . misc
 
 .SUFFIXES:.c .o
 
@@ -22,7 +23,7 @@ all-recur lib-recur clean-recur cleanlocal-recur install-recur:
                wdir=`pwd`; \
                list='$(SUBDIRS)'; for subdir in $$list; do \
                        cd $$subdir; \
-                       $(MAKE) -f Makefile.generic CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
+                       $(MAKE) -f Makefile CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
                                INCLUDES="$(INCLUDES)" LIBS="$(LIBS)" $$target || exit 1; \
                        cd $$wdir; \
                done;
@@ -34,6 +35,7 @@ lib:libbam.a
 libbam.a:$(OBJS)
                $(AR) -cru $@ $(OBJS)
 
+### For ncurses: comment out `-lcurses' if you do not have ncurses installed
 samtools:lib bamtk.o
                $(CC) $(CFLAGS) -o $@ bamtk.o $(LIBS) -L. -lbam -lcurses
 
index 6d69292fa19109e3f8bc1ec550377a7e4661d239..4b1bae5dd05e90b84895e8d7c7d6c0d76ace2550 100644 (file)
@@ -2,7 +2,7 @@ CC=                     gcc
 CXX=           g++
 CFLAGS=                -g -Wall -O2 -m64 #-arch ppc
 CXXFLAGS=      $(CFLAGS)
-DFLAGS=                -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+DFLAGS=                -D_FILE_OFFSET_BITS=64
 OBJS=          
 PROG=          faidx md5sum-lite md5fa maq2sam-short maq2sam-long wgsim
 INCLUDES=      -I..
index ea4c7f1da3bf201d32e8e430e108d89169ee9754..9f4210d939c684e7fd532e6543daf032c6ccb0c8 100644 (file)
@@ -31,7 +31,7 @@ uncompr.o: zlib.h zconf.h
 zutil.o: zutil.h zlib.h zconf.h
 
 cleanlocal:
-               rm -f *.o a.out *~ *.a libzr.a gmon.out
+               rm -f *.o a.out *~ *.a libz.a gmon.out
 
 clean:cleanlocal