From abd0e47c695551f4e0956a0c0ba49e762e6a2faa Mon Sep 17 00:00:00 2001 From: zinface Date: Sat, 10 Dec 2022 22:55:26 +0800 Subject: [PATCH] =?UTF-8?q?make:=20=E6=B7=BB=E5=8A=A0=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC=EF=BC=8C=E5=AF=B9=20VSCode?= =?UTF-8?q?=20=E7=94=A8=E6=88=B7=E5=8F=8B=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 此部分对 VSCode 用户友好,并提供一些可扩展的操作 1. make 时将创建 build 目录并使用 qmake 构建(核心数为机器最大核心数) 2. make run 时将运行此程序(程序构建位置将在: build/src/spark-store) 3. make package 用来提供产出包功能? --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1b2794c --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +# 此部分对 VSCode 用户友好,并提供一些可扩展的操作 +# 1. make 时将创建 build 目录并使用 qmake 构建(核心数为机器最大核心数) +# 2. make run 时将运行此程序(程序构建位置将在: build/src/spark-store) +# 3. make package 用来提供产出包功能? + +CPUS=$(shell nproc) +PROGRAM=build/src/spark-store + +all: + mkdir -p build + cd build && qmake .. + cd build && make -j$(CPUS) + +run: all + @# exec $(shell find build/ -maxdepth 1 -type f -executable) + exec $(PROGRAM)