diff --git a/src/Makefile b/src/Makefile index 05bbd609047..5cd3b4dbc2d 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 08722659fb6..5286224e5e1 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 7bc49e74931..d174915d1a3 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