Add Makefile for cxx template

This commit is contained in:
ulic-youthlic 2025-06-05 12:52:17 +08:00
parent 126a731141
commit a80c2ef2c8
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

16
templates/cxx/Makefile Normal file
View file

@ -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