From: On behalf of John Marshall Date: Thu, 10 Dec 2009 15:03:58 +0000 (+0000) Subject: Depend on libbam.a rather than the phony target, so that samtools is not X-Git-Url: https://git.donarmstrong.com/?p=samtools.git;a=commitdiff_plain;h=8bff7a4a9b1e1378dd837d066c7a059d88b14917 Depend on libbam.a rather than the phony target, so that samtools is not unnecessarily rebuilt every time. Also clean bgzip. --- diff --git a/Makefile b/Makefile index 59beb57..0ab4498 100644 --- a/Makefile +++ b/Makefile @@ -31,12 +31,15 @@ all-recur lib-recur clean-recur cleanlocal-recur install-recur: all:$(PROG) +.PHONY:all lib clean cleanlocal +.PHONY:all-recur lib-recur clean-recur cleanlocal-recur install-recur + lib:libbam.a libbam.a:$(LOBJS) $(AR) -cru $@ $(LOBJS) -samtools:lib $(AOBJS) +samtools:$(AOBJS) libbam.a $(CC) $(CFLAGS) -o $@ $(AOBJS) libbam.a -lm $(LIBPATH) $(LIBCURSES) -lz razip:razip.o razf.o $(KNETFILE_O) @@ -64,6 +67,6 @@ faidx.o:faidx.h razf.h khash.h faidx_main.o:faidx.h razf.h cleanlocal: - rm -fr gmon.out *.o a.out *.exe *.dSYM razip $(PROG) *~ *.a + rm -fr gmon.out *.o a.out *.exe *.dSYM razip bgzip $(PROG) *~ *.a clean:cleanlocal-recur diff --git a/Makefile.mingw b/Makefile.mingw index 670c941..9df4b9a 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -21,12 +21,15 @@ LIBPATH= all:$(PROG) +.PHONY:all lib clean cleanlocal +.PHONY:all-recur lib-recur clean-recur cleanlocal-recur install-recur + lib:libbam.a libbam.a:$(LOBJS) $(AR) -cru $@ $(LOBJS) -samtools:lib $(AOBJS) +samtools:$(AOBJS) libbam.a $(CC) $(CFLAGS) -o $@ $(AOBJS) $(LIBPATH) -lm -L. -lbam -Lwin32 -lz -lcurses -lws2_32 razip:razip.o razf.o $(KNETFILE_O) @@ -53,4 +56,4 @@ faidx.o:faidx.h razf.h khash.h faidx_main.o:faidx.h razf.h clean: - rm -fr gmon.out *.o *.exe *.dSYM razip $(PROG) *~ *.a + rm -fr gmon.out *.o *.exe *.dSYM razip bgzip $(PROG) *~ *.a