3 CFLAGS= -g -Wall -O2 #-m64 #-arch ppc
5 DFLAGS= -D_FILE_OFFSET_BITS=64 #-D_NO_CURSES
6 LOBJS= bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o \
7 bam_pileup.o bam_lpileup.o bam_md.o glf.o razf.o faidx.o
8 AOBJS= bam_sort.o bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o \
9 bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o \
18 $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
20 all-recur lib-recur clean-recur cleanlocal-recur install-recur:
21 @target=`echo $@ | sed s/-recur//`; \
23 list='$(SUBDIRS)'; for subdir in $$list; do \
25 $(MAKE) CC="$(CC)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
26 INCLUDES="$(INCLUDES)" $$target || exit 1; \
35 $(AR) -cru $@ $(LOBJS)
37 ### For the curses library: comment out `-lcurses' if you do not have curses installed
39 $(CC) $(CFLAGS) -o $@ $(AOBJS) -lm -lcurses -lz -L. -lbam
42 $(CC) $(CFLAGS) -o $@ razf.o razip.o -lz
45 $(CC) $(CFLAGS) -o $@ bgzf.o bgzip.o -lz
48 bam.o:bam.h razf.h bam_endian.h kstring.h
50 bam_import.o:bam.h kseq.h khash.h razf.h
51 bam_pileup.o:bam.h razf.h ksort.h
52 bam_plcmd.o:bam.h faidx.h bam_maqcns.h glf.h
53 bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h
54 bam_lpileup.o:bam.h ksort.h
55 bam_tview.o:bam.h faidx.h bam_maqcns.h
56 bam_maqcns.o:bam.h ksort.h bam_maqcns.h
57 bam_sort.o:bam.h ksort.h razf.h
58 bam_md.o:bam.h faidx.h
61 faidx.o:faidx.h razf.h khash.h
62 faidx_main.o:faidx.h razf.h
65 rm -fr gmon.out *.o a.out *.dSYM razip $(PROG) *~ *.a
67 clean:cleanlocal-recur