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.

43 lines
607B

  1. CXX=g++
  2. RM=rm -f
  3. CD=cd
  4. CPPFLAGS=-Wall -g
  5. LDFLAGS=-g
  6. SRCS=$(wildcard src/*.cpp)
  7. OBJS=$(subst .cpp,.o,$(SRCS))
  8. TEST_SRCS=$(wildcard tests/*.cpp)
  9. TEST_OBJS=$(subst .cpp,.o,$(TEST_SRCS))
  10. ifdef COV
  11. CPPFLAGS += -fprofile-arcs -ftest-coverage
  12. LDFLAGS += -fprofile-arcs -ftest-coverage
  13. endif
  14. all: test
  15. test: $(OBJS) $(TEST_OBJS)
  16. $(CXX) $(LDFLAGS) -o testrunner $(OBJS) $(TEST_OBJS)
  17. depend: .depend
  18. .depend: $(SRCS) $(TEST_SRCS)
  19. $(RM) -f ./.depend
  20. $(CXX) $(CPPFLAGS) -MM $^>>./.depend;
  21. clean:
  22. $(RM) $(OBJS)
  23. $(RM) $(TEST_OBJS)
  24. dist-clean: clean
  25. $(RM) *~ .depend
  26. docs:
  27. doxygen
  28. include .depend