Skip to content

Commit

Permalink
core: makefiles updated to use the new paths to source code files
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Dec 7, 2016
1 parent cf83221 commit e906567
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions src/Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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=
Expand All @@ -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

Expand Down Expand Up @@ -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=
Expand All @@ -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 "" >>$@
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.defs
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/Makefile.sources
Expand Up @@ -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
Expand Down

0 comments on commit e906567

Please sign in to comment.