]> git.donarmstrong.com Git - samtools.git/blobdiff - Makefile
* samtools-0.1.5-9 (r405)
[samtools.git] / Makefile
index 9bf6d80cd8f32070a18a181f7507acb0066c37e3..40b35ae5440b5a0521c7296f6dd2b2f9e9b3ae92 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,17 @@
 CC=                    gcc
-CXX=           g++
 CFLAGS=                -g -Wall -O2 #-m64 #-arch ppc
-CXXFLAGS=      $(CFLAGS)
-DFLAGS=                -D_FILE_OFFSET_BITS=64 #-D_NO_CURSES
+DFLAGS=                -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=2
 LOBJS=         bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o \
-                       bam_pileup.o bam_lpileup.o bam_md.o glf.o razf.o faidx.o
-AOBJS=         bam_sort.o bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o      \
+                       bam_pileup.o bam_lpileup.o bam_md.o glf.o razf.o faidx.o knetfile.o     \
+                       bam_sort.o
+AOBJS=         bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o \
                        bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o     \
                        bamtk.o
-PROG=          samtools bgzip
-INCLUDES=      
+PROG=          samtools
+INCLUDES=
 SUBDIRS=       . misc
+LIBPATH=
+LIBCURSES=     -lXCurses # -lXCurses
 
 .SUFFIXES:.c .o
 
@@ -23,7 +24,7 @@ all-recur lib-recur clean-recur cleanlocal-recur install-recur:
                list='$(SUBDIRS)'; for subdir in $$list; do \
                        cd $$subdir; \
                        $(MAKE) CC="$(CC)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
-                               INCLUDES="$(INCLUDES)" $$target || exit 1; \
+                               INCLUDES="$(INCLUDES)" LIBPATH="$(LIBPATH)" $$target || exit 1; \
                        cd $$wdir; \
                done;
 
@@ -34,9 +35,8 @@ lib:libbam.a
 libbam.a:$(LOBJS)
                $(AR) -cru $@ $(LOBJS)
 
-### For the curses library: comment out `-lcurses' if you do not have curses installed
 samtools:lib $(AOBJS)
-               $(CC) $(CFLAGS) -o $@ $(AOBJS) -lm -lcurses -lz -L. -lbam
+               $(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) $(LIBCURSES) -lz -L. -lbam
 
 razip:razip.o razf.o
                $(CC) $(CFLAGS) -o $@ razf.o razip.o -lz