about summary refs log tree commit diff
path: root/third_party/nix/mk/patterns.mk
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/mk/patterns.mk')
-rw-r--r--third_party/nix/mk/patterns.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/nix/mk/patterns.mk b/third_party/nix/mk/patterns.mk
new file mode 100644
index 000000000000..3219d9629fbf
--- /dev/null
+++ b/third_party/nix/mk/patterns.mk
@@ -0,0 +1,11 @@
+$(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
+
+$(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
+
+$(buildprefix)%.o: %.c
+	@mkdir -p "$(dir $@)"
+	$(trace-cc) $(CC) -o $@ -c $< $(GLOBAL_CFLAGS) $(CFLAGS) $($@_CFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP