Add Makefile for cxx template
This commit is contained in:
parent
126a731141
commit
a80c2ef2c8
1 changed files with 16 additions and 0 deletions
16
templates/cxx/Makefile
Normal file
16
templates/cxx/Makefile
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue