Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. EMACS_COMPAT=
  22. ifneq ($(INSIDE_EMACS),)
  23. EMACS_COMPAT=-e
  24. endif
  25. # forward all named targets
  26. %:
  27. $(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
  28. # forward the default target
  29. default:
  30. $(MAKE) -C $(KSR_DIR)
  31. # forward the install target
  32. .PHONY: install
  33. install:
  34. $(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
  35. .PHONY: TAGS
  36. .PHONY: tags
  37. TAGS tags:
  38. $(MKTAGS) $(EMACS_COMPAT) --exclude="misc/*" --exclude="test/*" -R .
  39. # clean everything generated - shortcut on maintainer-clean
  40. .PHONY: pure
  41. clean pure distclean:
  42. @rm -f .*.swp tags TAGS
  43. $(MAKE) -C $(KSR_DIR) $@
  44. #