makefile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. include constants.mk helpers.mk
  2. all: \
  3. debug \
  4. create_directories \
  5. build_deps \
  6. bot \
  7. prepare_data
  8. create_directories: $(build_dir)
  9. $(build_dir):
  10. @$(call print_info, "creating build directory")
  11. @mkdir -p $(build_dir)
  12. build_deps:
  13. $(MAKE) -C $(dep_src_dir)
  14. bot:
  15. $(MAKE) -C $(src_dir)
  16. bot_clean:
  17. $(MAKE) -C $(src_dir) clean
  18. test:
  19. $(MAKE) -C $(src_dir) lib
  20. $(MAKE) -C $(test_dir) test_suite=$(test_suite)
  21. test_clean:
  22. $(MAKE) -C $(test_dir) clean
  23. prepare_data:
  24. $(MAKE) -C $(data_dir)
  25. debug:
  26. ifdef debug
  27. @$(call print_info, "building in debug mode")
  28. endif
  29. .PHONY: clean
  30. clean:
  31. rm -fR $(build_dir)
  32. help:
  33. @$(call print_info, "available commands:")
  34. @$(call print_help,'[<targetname>] [debug=true|1]','enable debug option')
  35. @$(call print_help,'bot','compile scrapper bot')
  36. @$(call print_help,'bot_clean','clean scrapper bot')
  37. @$(call print_help,'clean','clean all')
  38. @$(call print_help,'test [test_suite=<testname>]','compile and run test')
  39. @$(call print_help,'test_clean','clean test')
  40. .PHONY: test