Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. VERSION=2.5.1
  2. RELEASE=20200511
  3. CC := mpicc
  4. BIN := /usr/local/bin
  5. DEBUG := 0
  6. ifeq (0, ${MAKELEVEL})
  7. TIMESTAMP=$(shell date)
  8. endif
  9. ifeq (1, ${DEBUG})
  10. CFLAGS=-g3 -W -Wall -Wno-unused-but-set-variable -O0 -DDEBUG=1 -DVERSION="$(VERSION)" -DRELEASE="$(RELEASE)" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -msse4.2
  11. else
  12. CFLAGS=-W -Wall -Wno-unused-but-set-variable -O4 -DVERSION="$(VERSION)" -DRELEASE="$(RELEASE)" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -msse4.2
  13. endif
  14. GLIBS=-lm -lrt -lpthread -lz
  15. GENERIC_SRC=mem_share.h chararray.h sort.h list.h pgzf.h sort.h list.h dna.h thread.h filereader.h filewriter.h bitvec.h bit2vec.h bitsvec.h hashset.h
  16. PROGS=kbm2 wtdbg2 wtdbg-cns wtpoa-cns pgzf
  17. all: $(PROGS)
  18. kbm2: $(GENERIC_SRC) kbm.c kbm.h kbmpoa.h wtpoa.h tripoa.h poacns.h kswx.h ksw.h ksw.c
  19. $(CC) $(CFLAGS) -o $@ kbm.c ksw.c $(GLIBS)
  20. wtdbg2: $(GENERIC_SRC) wtdbg.c wtdbg-graph.h wtdbg.h kbm.h kswx.h ksw.h ksw.c kbmpoa.h wtpoa.h tripoa.h poacns.h
  21. $(CC) $(CFLAGS) -o $@ wtdbg.c ksw.c $(GLIBS)
  22. wtdbg-cns: $(GENERIC_SRC) wtdbg-cns.c kswx.h ksw.h ksw.c dbgcns.h dagcns.h queue.h general_graph.h
  23. $(CC) $(CFLAGS) -o wtdbg-cns wtdbg-cns.c ksw.c $(GLIBS)
  24. wtpoa-cns: $(GENERIC_SRC) wtpoa.h wtpoa-cns.c poacns.h tripoa.h ksw.h ksw.c
  25. $(CC) $(CFLAGS) -o $@ wtpoa-cns.c ksw.c $(GLIBS)
  26. pgzf: mem_share.h sort.h list.h thread.h pgzf.h pgzf.c
  27. $(CC) $(CFLAGS) -o $@ pgzf.c $(GLIBS)
  28. best_sam_hits4longreads: $(GENERIC_SRC) best_sam_hits4longreads.c
  29. $(CC) $(CFLAGS) -o $@ best_sam_hits4longreads.c $(GLIBS)
  30. clean:
  31. rm -f *.o *.gcda *.gcno *.gcov gmon.out $(PROGS)
  32. clear:
  33. rm -f *.o *.gcda *.gcno *.gcov gmon.out
  34. install: $(PROGS)
  35. mkdir -p $(BIN) && cp -fvu $(PROGS) $(BIN)