You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Simple Makefile
  2. #
  3. # make shared : make shared lib
  4. # make lib : make static lib (nyi)
  5. # make check
  6. #
  7. # You can also use 'dub' and 'dub test' instead
  8. D_COMPILER=ldc2
  9. DFLAGS = -wi -g -relocation-model=pic -Icontrib/undead -L-lz
  10. ifndef GUIX
  11. ifdef GUIX_ENVIRONMENT
  12. GUIX=$(GUIX_ENVIRONMENT)
  13. endif
  14. endif
  15. ifdef GUIX
  16. LIBRARY_PATH=$(GUIX)/lib
  17. endif
  18. DLIBS = $(LIBRARY_PATH)/libphobos2-ldc.a $(LIBRARY_PATH)/libdruntime-ldc.a
  19. DLIBS_DEBUG = $(LIBRARY_PATH)/libphobos2-ldc-debug.a $(LIBRARY_PATH)/libdruntime-ldc-debug.a
  20. SRC = $(wildcard contrib/undead/*.d) contrib/undead/*/*.d $(wildcard bio/*.d bio/*/*.d bio/*/*/*.d bio/*/*/*/*.d bio/*/*/*/*/*.d bio/*/*/*/*/*/*.d) test/unittests.d test/read_bam_file.d
  21. OBJ = $(SRC:.d=.o)
  22. BIN = bin/biod_tests
  23. shared: LIB = libbiod.so
  24. lib: LIB = libbiod
  25. # debug check: DFLAGS += -O0 -d-debug -unittest -link-debuglib
  26. check: DFLAGS += -O0 -d-debug -link-debuglib -unittest
  27. release static: DFLAGS += -O3 -release -enable-inlining -boundscheck=off
  28. static: DFLAGS += -static -L-Bstatic
  29. shared: DFLAGS += -shared
  30. lib: DFLAGS += -lib
  31. all: debug
  32. default: all
  33. default debug release static: $(BIN)
  34. shared lib: $(LIB)
  35. %.o: %.d
  36. $(D_COMPILER) $(DFLAGS) -c $< -od=$(dir $@)
  37. $(LIB): $(OBJ)
  38. $(info linking lib...)
  39. $(D_COMPILER) $(DFLAGS) $(OBJ) -of=$(LIB)
  40. $(BIN): $(OBJ)
  41. $(info linking...)
  42. $(D_COMPILER) $(DFLAGS) $(OBJ) -of=$(BIN)
  43. check: $(BIN)
  44. $(info Make check running tests...)
  45. $(BIN)
  46. # $(BIN) "--DRT-gcopt=gc:precise disable:1 cleanup:none"
  47. clean:
  48. rm -vf $(OBJ)
  49. rm -v $(BIN)
  50. # find -name '*.o' -exec rm \{\} \;