From a3edfa91e957b837e28521b636885bd25d7ca046 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Thu, 5 Jun 2025 12:52:17 +0800 Subject: [PATCH] Add `Makefile` for cxx template --- templates/cxx/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 templates/cxx/Makefile diff --git a/templates/cxx/Makefile b/templates/cxx/Makefile new file mode 100644 index 0000000..39127b0 --- /dev/null +++ b/templates/cxx/Makefile @@ -0,0 +1,16 @@ +main.out: main.o + $(CXX) -std=c++26 $^ -o $@ + +main.o: main.cxx + $(CXX) -std=c++26 -c $^ + +compile_commands.json: clean + bear -- make + +.PHONY: run clean +run: main + @echo Run: + @./main + +clean: + -rm main.out main.o