Add Makefile for cxx template

This commit is contained in:
ulic-youthlic 2025-06-05 12:52:17 +08:00
parent 126a731141
commit a3edfa91e9

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