aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-26 18:36:24 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-26 18:36:24 +0000
commite60bada432f9aa4af545117c3f2fa95ef5be21a0 (patch)
treecd886d4502889a93d96b50928be4913c795138d8 /Makefile.rules
parentb0072f8d99a99fdc617e6c9d30cbd64f5db46325 (diff)
simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode
add channels/busy.h and channels/ringtone.h to the repository instead of generating them repeatedtly; most users do not change the settings to build them, but the Makefile rules are still there if they wish to do so 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/branches/1.4@159476 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules17
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 387420f32..e4b174577 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