[sr-dev] git:master:e906567e: core: makefiles updated to use the new paths to source code files

Daniel-Constantin Mierla miconda at gmail.com
Wed Dec 7 14:05:45 CET 2016


Module: kamailio
Branch: master
Commit: e906567e774b6e47d5bff56638a8e9f3362d29eb
URL: https://github.com/kamailio/kamailio/commit/e906567e774b6e47d5bff56638a8e9f3362d29eb

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-12-07T12:08:54+01:00

core: makefiles updated to use the new paths to source code files

---

Modified: src/Makefile
Modified: src/Makefile.defs
Modified: src/Makefile.sources

---

Diff:  https://github.com/kamailio/kamailio/commit/e906567e774b6e47d5bff56638a8e9f3362d29eb.diff
Patch: https://github.com/kamailio/kamailio/commit/e906567e774b6e47d5bff56638a8e9f3362d29eb.patch

---

diff --git a/src/Makefile b/src/Makefile
index 05bbd60..5cd3b4d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -17,9 +17,9 @@ $(error make version $(MAKE_VERSION) not supported, use at least $(req_ver))
 endif
 
 
-auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
-auto_gen_others=cfg.tab.h # auto generated, non-c
-auto_gen_keep=autover.h # auto generated, should be included in archives
+auto_gen=core/lex.yy.c core/cfg.tab.c #lexx, yacc etc
+auto_gen_others=core/cfg.tab.h # auto generated, non-c
+auto_gen_keep=core/autover.h # auto generated, should be included in archives
 
 COREPATH=.
 #include  source related defs
@@ -253,14 +253,14 @@ endif
 # include the common rules
 include Makefile.rules
 
-#extra targets 
+#extra targets
 
 $(NAME): $(extra_objs) # static_modules
 
-lex.yy.c: cfg.lex cfg.tab.h $(ALLDEP)
-	$(LEX) $<
+core/lex.yy.c: core/cfg.lex core/cfg.tab.h $(ALLDEP)
+	$(LEX) -o core/lex.yy.c $<
 
-cfg.tab.c cfg.tab.h: cfg.y  $(ALLDEP)
+core/cfg.tab.c core/cfg.tab.h: core/cfg.y  $(ALLDEP)
 	$(YACC) $(YACC_FLAGS) $<
 
 nullstring=
@@ -275,7 +275,7 @@ main.o: DEFS+=-DMODS_DIR='"$(modules_search_path)"'
 
 
 #special depends for ver.c
-ver.d ver.o: autover.h
+core/ver.d core/ver.o: core/autover.h
 
 include Makefile.shared
 
@@ -358,7 +358,7 @@ repo_ver=$(shell  RV=`git rev-parse --verify --short=6 HEAD 2>/dev/null`;\
 						RV="$$RV"-dirty; echo "$$RV")
 repo_hash=$(subst -dirty,,$(repo_ver))
 repo_state=$(subst %-dirty,dirty,$(findstring -dirty,$(repo_ver)))
-autover_h_dep=.git $(filter-out $(auto_gen), $(sources)) cfg.y cfg.lex Makefile
+autover_h_dep=.git $(filter-out $(auto_gen), $(sources)) core/cfg.y core/cfg.lex Makefile
 else
 # else if .git/ does not exist
 repo_ver=
@@ -368,9 +368,9 @@ autover_h_dep=
 endif
 
 
-autover.h: $(autover_h_dep)
-	@echo  "generating autover.h ..."
-	@echo "/* this file is autogenerated by make autover.h" >$@
+core/autover.h: $(autover_h_dep)
+	@echo  "generating core/autover.h ..."
+	@echo "/* this file is autogenerated by make core/autover.h" >$@
 	@echo " * DO NOT EDIT IT" >>$@
 	@echo " */" >>$@
 	@echo "" >>$@
diff --git a/src/Makefile.defs b/src/Makefile.defs
index 0872265..5286224 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -1709,7 +1709,7 @@ endif
 ifeq ($(YACC),)
 	YACC=bison
 endif
-YACC_FLAGS=-d -b cfg
+YACC_FLAGS=-d -b core/cfg
 # on solaris add -lxnet (e.g. LIBS= -lxnet)
 LIBS= -ldl -lresolv
 LIB_PREFIX:=lib
diff --git a/src/Makefile.sources b/src/Makefile.sources
index 7bc49e7..d174915 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -10,12 +10,12 @@
 # defines: sources, objs, depends
 #
 
-sources=$(filter-out $(auto_gen), $(wildcard *.c) $(wildcard mem/*.c) \
-		$(wildcard parser/*.c) $(wildcard parser/digest/*.c) \
-		$(wildcard parser/contact/*.c) $(wildcard db/*.c) \
-		$(wildcard parser/sdp/*.c) \
-		$(wildcard rand/*.c) $(wildcard rand/isaac/*.c) ) \
-		$(wildcard cfg/*.c) $(auto_gen)
+sources=$(filter-out $(auto_gen), $(wildcard *.c) \
+		$(wildcard core/*.c) $(wildcard core/mem/*.c) \
+		$(wildcard core/parser/*.c) $(wildcard core/parser/digest/*.c) \
+		$(wildcard core/parser/contact/*.c) $(wildcard core/parser/sdp/*.c) \
+		$(wildcard core/rand/*.c) $(wildcard core/rand/isaac/*.c) ) \
+		$(wildcard core/cfg/*.c) $(auto_gen)
 ifeq ($(CORE_TLS), 1)
 	sources+= $(wildcard tls/*.c)
 endif




More information about the sr-dev mailing list