summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2009-03-29 23:32:02 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2009-03-29 23:32:02 +0000
commit8ebe660feadd5b9638deea2351ad4373e11f23bd (patch)
tree1701a559cc8068f42fb4b11d0863d53064fef156 /Makefile
parentf388785f8aca5c87d54cd997225f927b48e066e1 (diff)
downloadnetsurf-8ebe660feadd5b9638deea2351ad4373e11f23bd.tar.gz
netsurf-8ebe660feadd5b9638deea2351ad4373e11f23bd.tar.bz2
Fixed the dep tracking for gcc2, finally... the dependancy_generate_c should probably be merged now as most dep is done in compile_c...
svn path=/trunk/netsurf/; revision=6988
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 15 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 0b893f91a..839536b09 100644
--- a/Makefile
+++ b/Makefile
@@ -722,25 +722,11 @@ DEPFILES :=
# 1 = Source file
# 2 = dep filename, no prefix
# 3 = obj filename, no prefix
-ifeq ($(GCCVER),2)
-# simpler deps tracking for gcc2...
define dependency_generate_c
DEPFILES += $(2)
$$(DEPROOT)/$(2): $$(DEPROOT)/created $(1) css/css_enum.h css/parser.h Makefile.config
- $$(VQ)echo " DEP: $(1)"
- $$(Q)$$(RM) $$(DEPROOT)/$(2)
- $$(Q)$$(CC) $$(CFLAGS) -MM \
- $(1) | sed 's,^.*:,$$(DEPROOT)/$2 $$(OBJROOT)/$(3):,' \
- > $$(DEPROOT)/$(2)
endef
-else
-define dependency_generate_c
-DEPFILES += $(2)
-$$(DEPROOT)/$(2): $$(DEPROOT)/created $(1) css/css_enum.h css/parser.h Makefile.config
-
-endef
-endif
# 1 = Source file
# 2 = dep filename, no prefix
@@ -755,10 +741,16 @@ endef
# 2 = obj filename, no prefix
# 3 = dep filename, no prefix
ifeq ($(GCCVER),2)
+# simpler deps tracking for gcc2...
define compile_target_c
-$$(OBJROOT)/$(2): $$(OBJROOT)/created $$(DEPROOT)/$(3)
+$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
+ $$(VQ)echo " DEP: $(1)"
+ $$(Q)$$(RM) $$(DEPROOT)/$(3)
+ $$(Q)$$(CC) $$(CFLAGS) -MM \
+ $(1) | sed 's,^.*:,$$(DEPROOT)/$(3) $$(OBJROOT)/$(2):,' \
+ > $$(DEPROOT)/$(3)
$$(VQ)echo " COMPILE: $(1)"
- $$(Q)$$(CC) $$(CFLAGS) -o $$@ -c $(1)
+ $$(Q)$$(CC) $$(CFLAGS) -o $$(OBJROOT)/$(2) -c $(1)
endef
else
@@ -773,7 +765,12 @@ endef
endif
define compile_target_cpp
-$$(OBJROOT)/$(2): $$(OBJROOT)/created $$(DEPROOT)/$(3)
+$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
+ $$(VQ)echo " DEP: $(1)"
+ $$(Q)$$(RM) $$(DEPROOT)/$(3)
+ $$(Q)$$(CC) $$(CFLAGS) -MM \
+ $(1) | sed 's,^.*:,$$(DEPROOT)/$(3) $$(OBJROOT)/$(2):,' \
+ > $$(DEPROOT)/$(3)
$$(VQ)echo " COMPILE: $(1)"
$$(Q)$$(CXX) $$(CFLAGS) -o $$@ -c $(1)
@@ -783,7 +780,7 @@ endef
# 2 = obj filename, no prefix
# 3 = dep filename, no prefix
define compile_target_s
-$$(DEPROOT)/$3 $$(OBJROOT)/$(2): $$(OBJROOT)/created
+$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
$$(VQ)echo "ASSEMBLE: $(1)"
$$(Q)$$(RM) $$(DEPROOT)/$(3)
$$(Q)$$(CC) $$(ASFLAGS) -MMD -MT '$$(DEPROOT)/$(3) $$(OBJROOT)/$(2)' \