3 CFLAGS= -g -Wall -O2 -m64 #-arch ppc
5 DFLAGS= -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 -DHAVE_RAZF #-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 PROG= razip bgzip samtools
16 $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
18 all-recur lib-recur clean-recur cleanlocal-recur install-recur:
19 @target=`echo $@ | sed s/-recur//`; \
21 list='$(SUBDIRS)'; for subdir in $$list; do \
23 $(MAKE) CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
24 INCLUDES="$(INCLUDES)" $$target || exit 1; \
36 $(CC) $(CFLAGS) -o $@ bamtk.o $(LIBS) -L. -lbam -lcurses
39 $(CC) $(CFLAGS) -o $@ razf.o razip.o $(LIBS)
42 $(CC) $(CFLAGS) -o $@ bgzf.o bgzip.o $(LIBS)
45 bam.o:bam.h razf.h bam_endian.h
46 bam_import.o:bam.h kseq.h khash.h razf.h
47 bam_pileup.o:bam.h razf.h ksort.h
48 bam_plcmd.o:bam.h faidx.h bam_maqcns.h
49 bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h
50 bam_lpileup.o:bam.h ksort.h
51 bam_tview.o:bam.h faidx.h bam_maqcns.h
52 bam_maqcns.o:bam.h ksort.h bam_maqcns.h
53 bam_sort.o:bam.h ksort.h razf.h
56 faidx.o:faidx.h razf.h khash.h
57 faidx_main.o:faidx.h razf.h
60 rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a
62 clean:cleanlocal-recur