Makefile 886 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # Root Makefile for Kamailio project
  3. # - forward all commands to the Makefile in the src/ subfolder
  4. #
  5. # path to the source code folder
  6. KSR_DIR ?= src/
  7. # default target for makefile
  8. .DEFAULT_GOAL := default
  9. # strip the src/ from the path to modules
  10. SMODPARAM=
  11. ifneq ($(modules),)
  12. ifneq (,$(findstring src/,$(modules)))
  13. smodules=$(subst src/,,$(modules))
  14. SMODPARAM=modules=$(smodules)
  15. endif
  16. endif
  17. MKTAGS?=ctags
  18. # forward all named targets
  19. %:
  20. $(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
  21. # forward the default target
  22. default:
  23. $(MAKE) -C $(KSR_DIR)
  24. # forward the install target
  25. .PHONY: install
  26. install:
  27. $(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
  28. .PHONY: TAGS
  29. .PHONY: tags
  30. TAGS tags:
  31. $(MKTAGS) --exclude="misc/*" --exclude="test/*" -R .
  32. # clean everything generated - shortcut on maintainer-clean
  33. .PHONY: pure
  34. clean pure distclean:
  35. @rm -f .*.swp tags TAGS
  36. $(MAKE) -C $(KSR_DIR) $@
  37. #