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
|
d72c3f2c |
ifneq ($(wildcard modules),)
$(warning "old Kamailio modules directory found, you should clean that")
endif
|
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
|
35c846b1 |
EMACS_COMPAT=
|
ef19acf3 |
ifneq ($(INSIDE_EMACS),)
|
35c846b1 |
EMACS_COMPAT=-e
endif
|
d82ab50f |
|
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:
|
35c846b1 |
$(MKTAGS) $(EMACS_COMPAT) --exclude="misc/*" --exclude="test/*" -R .
|
d82ab50f |
# clean everything generated - shortcut on maintainer-clean
.PHONY: pure
clean pure distclean:
@rm -f .*.swp tags TAGS
$(MAKE) -C $(KSR_DIR) $@
#
|