Makefile
8370cd94
 #
 # Root Makefile for Kamailio project
 # - forward all commands to the Makefile in the src/ subfolder
 #
 
e9cfbfd6
 
8370cd94
 # path to the source code folder
 KSR_DIR ?= src/
 
 # default target for makefile
 .DEFAULT_GOAL := default
 
e9cfbfd6
 
 # strip the src/ from the path to modules
 SMODPARAM=
 ifneq ($(modules),)
 ifneq (,$(findstring src/,$(modules)))
 smodules=$(subst src/,,$(modules))
 SMODPARAM=modules=$(smodules)
 endif
 endif
 
d82ab50f
 MKTAGS?=ctags
 
8370cd94
 # forward all named targets
 %:
e9cfbfd6
 	$(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
8370cd94
 
 # forward the default target
 default:
 	$(MAKE) -C $(KSR_DIR)
09c3918f
 
e9cfbfd6
 # forward the install target
09c3918f
 .PHONY: install
 install:
e9cfbfd6
 	$(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
d82ab50f
 
 .PHONY: TAGS
 .PHONY: tags
 TAGS tags:
 	$(MKTAGS) --exclude="misc/*" --exclude="test/*" -R .
 
 # clean everything generated - shortcut on maintainer-clean
 .PHONY: pure
 clean pure distclean:
 	@rm -f .*.swp tags TAGS
 	$(MAKE) -C $(KSR_DIR) $@
 
 #