Makefile 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. ifneq ($(wildcard modules),)
  10. $(warning "old Kamailio modules directory found, you should clean that")
  11. endif
  12. # strip the src/ from the path to modules
  13. SMODPARAM=
  14. ifneq ($(modules),)
  15. ifneq (,$(findstring src/,$(modules)))
  16. smodules=$(subst src/,,$(modules))
  17. SMODPARAM=modules=$(smodules)
  18. endif
  19. endif
  20. MKTAGS?=ctags
  21. # forward all named targets
  22. %:
  23. $(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
  24. # forward the default target
  25. default:
  26. $(MAKE) -C $(KSR_DIR)
  27. # forward the install target
  28. .PHONY: install
  29. install:
  30. $(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
  31. .PHONY: TAGS
  32. .PHONY: tags
  33. TAGS tags:
  34. $(MKTAGS) --exclude="misc/*" --exclude="test/*" -R .
  35. # clean everything generated - shortcut on maintainer-clean
  36. .PHONY: pure
  37. clean pure distclean:
  38. @rm -f .*.swp tags TAGS
  39. $(MAKE) -C $(KSR_DIR) $@
  40. #