about summary refs log tree commit diff
path: root/mk/patterns.mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-14T00·47+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-14T00·47+0100
commit14955c297de82e964ea5bf44f8aaf543d4cae33a (patch)
tree264740d66d805dbbb82c03146830a2a022569d88 /mk/patterns.mk
parent68b47178730a95871eba4aa4df19a845c8e5a947 (diff)
parent36c67860363c93eb00cf5b8e2ad34f6f775e6901 (diff)
Merge commit '36c67860363c93eb00cf5b8e2ad34f6f775e6901'
Diffstat (limited to 'mk/patterns.mk')
-rw-r--r--mk/patterns.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/mk/patterns.mk b/mk/patterns.mk
index 6b2cfd017050..3219d9629fbf 100644
--- a/mk/patterns.mk
+++ b/mk/patterns.mk
@@ -1,8 +1,11 @@
-%.o: %.cc
+$(buildprefix)%.o: %.cc
+	@mkdir -p "$(dir $@)"
 	$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(GLOBAL_CXXFLAGS_PCH) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP
 
-%.o: %.cpp
+$(buildprefix)%.o: %.cpp
+	@mkdir -p "$(dir $@)"
 	$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(GLOBAL_CXXFLAGS_PCH) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP
 
-%.o: %.c
+$(buildprefix)%.o: %.c
+	@mkdir -p "$(dir $@)"
 	$(trace-cc) $(CC) -o $@ -c $< $(GLOBAL_CFLAGS) $(CFLAGS) $($@_CFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP