about summary refs log tree commit diff
path: root/mk/patterns.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/patterns.mk')
-rw-r--r--mk/patterns.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/mk/patterns.mk b/mk/patterns.mk
new file mode 100644
index 000000000000..f5674d40436c
--- /dev/null
+++ b/mk/patterns.mk
@@ -0,0 +1,8 @@
+%.o: %.cc
+	$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP
+
+%.o: %.cpp
+	$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP
+
+%.o: %.c
+	$(trace-cc) $(CC) -o $@ -c $< $(GLOBAL_CFLAGS) $(CFLAGS) $($@_CFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP