diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-26 19:08:56 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-26 19:08:56 +0000 |
commit | e2574a3f9235950274d57c17e78468aa730037d6 (patch) | |
tree | 3fac1b5bbbac0fbaa164a88cfb7b735bf3c778fd /Makefile.rules | |
parent | d1270f4bd196c52f0c2887c54185c56c1f5cf07e (diff) |
Merged revisions 159476 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r159476 | kpfleming | 2008-11-26 12:36:24 -0600 (Wed, 26 Nov 2008) | 7 lines
simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode
ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159534 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile.rules b/Makefile.rules index 92fca37c9..db44a876b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -19,6 +19,11 @@ .PHONY: dist-clean +# If 'make' decides to create intermediate files to satisfy a build requirement +# (like producing a .i from a .c), we want to keep them, so tell make to keep +# all intermediate files +.SECONDARY: + # extra cflags to build dependencies. Recursively expanded. MAKE_DEPS=-MD -MT $@ -MF .$(subst /,_,$@).d -MP @@ -74,13 +79,9 @@ ifeq ($(COMPILE_DOUBLE),yes) endif $(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) +ifneq ($(COMPILE_DOUBLE),yes) %.o: %.c $(ECHO_PREFIX) echo " [CC] $< -> $@" -ifeq ($(COMPILE_DOUBLE),yes) - $(CMD_PREFIX) $(CC) -o $(@:%.o=%.i) -E $< $(CC_CFLAGS) $(MAKE_DEPS) - $(CMD_PREFIX) $(CC) -o /dev/null -c $(@:%.o=%.i) $(CC_CFLAGS) $(OPTIMIZE) - $(CMD_PREFIX) $(CC) -o $@ -c $(@:%.o=%.i) $(CC_CFLAGS) -else $(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS) endif @@ -95,13 +96,9 @@ ifeq ($(COMPILE_DOUBLE),yes) endif $(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) +ifneq ($(COMPILE_DOUBLE),yes) %.oo: %.cc $(ECHO_PREFIX) echo " [CXX] $< -> $@" -ifeq ($(COMPILE_DOUBLE),yes) - $(CMD_PREFIX) $(CXX) -o $(@:%.oo=%.ii) -E $< $(CXX_CFLAGS) $(MAKE_DEPS) - $(CMD_PREFIX) $(CXX) -o /dev/null -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS) $(OPTIMIZE) - $(CMD_PREFIX) $(CXX) -o $@ -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS) -else $(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS) endif |