3 CFLAGS= -g -Wall -O2 #-m64 #-arch ppc
5 DFLAGS= -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 #-D_NO_CURSES
6 OBJS= bam.o bam_import.o bam_pileup.o bam_lpileup.o bam_sort.o bam_index.o \
7 razf.o bgzf.o faidx.o bam_tview.o bam_maqcns.o bam_aux.o bam_plcmd.o \
8 bam_mate.o bam_rmdup.o glf.o bam_stat.o kstring.o bam_md.o sam.o sam_view.o \
17 $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
19 all-recur lib-recur clean-recur cleanlocal-recur install-recur:
20 @target=`echo $@ | sed s/-recur//`; \
22 list='$(SUBDIRS)'; for subdir in $$list; do \
24 $(MAKE) CC="$(CC)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
25 INCLUDES="$(INCLUDES)" $$target || exit 1; \
36 ### For the curses library: comment out `-lcurses' if you do not have curses installed
38 $(CC) $(CFLAGS) -o $@ bamtk.o -lm -L. -lbam -lcurses -lz
41 $(CC) $(CFLAGS) -o $@ razf.o razip.o -lz
44 $(CC) $(CFLAGS) -o $@ bgzf.o bgzip.o -lz
47 bam.o:bam.h razf.h bam_endian.h kstring.h
49 bam_import.o:bam.h kseq.h khash.h razf.h
50 bam_pileup.o:bam.h razf.h ksort.h
51 bam_plcmd.o:bam.h faidx.h bam_maqcns.h glf.h
52 bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h
53 bam_lpileup.o:bam.h ksort.h
54 bam_tview.o:bam.h faidx.h bam_maqcns.h
55 bam_maqcns.o:bam.h ksort.h bam_maqcns.h
56 bam_sort.o:bam.h ksort.h razf.h
57 bam_md.o:bam.h faidx.h
60 faidx.o:faidx.h razf.h khash.h
61 faidx_main.o:faidx.h razf.h
64 rm -fr gmon.out *.o a.out *.dSYM razip $(PROG) *~ *.a
66 clean:cleanlocal-recur