zhanghongtong 5 роки тому
батько
коміт
995de75890
3 змінених файлів з 43 додано та 10 видалено
  1. 15 4
      Makefile
  2. 13 3
      README-CN.md
  3. 15 3
      README.md

+ 15 - 4
Makefile

@@ -21,8 +21,11 @@ endif
 
 
 TARGET ?= emqx/kuiper
 TARGET ?= emqx/kuiper
 
 
-.PHONY: all
-all: build_without_edgex
+.PHONY: build
+build: build_without_edgex
+
+.PHONY:pkg
+pkg: pkg_without_edgex
 
 
 .PHONY: build_prepare
 .PHONY: build_prepare
 build_prepare:
 build_prepare:
@@ -52,6 +55,10 @@ build_without_edgex: build_prepare
 	@mv ./cli ./server $(BUILD_PATH)/$(PACKAGE_NAME)/bin
 	@mv ./cli ./server $(BUILD_PATH)/$(PACKAGE_NAME)/bin
 	@echo "Build successfully"
 	@echo "Build successfully"
 
 
+.PHONY: pkg_without_edgex
+pkg_without_edgex: build_without_edgex
+	@make real_pkg
+
 .PHONY: build_with_edgex
 .PHONY: build_with_edgex
 build_with_edgex: build_prepare
 build_with_edgex: build_prepare
 	@if [ ! -z $(GOOS) ] && [ ! -z $(GOARCH) ] && [ $(CGO_ENABLED) == 0 ];then \
 	@if [ ! -z $(GOOS) ] && [ ! -z $(GOARCH) ] && [ $(CGO_ENABLED) == 0 ];then \
@@ -65,8 +72,12 @@ build_with_edgex: build_prepare
 	@mv ./cli ./server $(BUILD_PATH)/$(PACKAGE_NAME)/bin
 	@mv ./cli ./server $(BUILD_PATH)/$(PACKAGE_NAME)/bin
 	@echo "Build successfully"
 	@echo "Build successfully"
 
 
-.PHONY: pkg
-pkg: build_without_edgex
+.PHONY: pkg_whit_edgex
+pkg_whit_edgex: build_with_edgex 
+	@make real_pkg
+
+.PHONY: real_pkg
+real_pkg:
 	@mkdir -p $(PACKAGES_PATH)
 	@mkdir -p $(PACKAGES_PATH)
 	@cd $(BUILD_PATH) && zip -rq $(PACKAGE_NAME).zip $(PACKAGE_NAME)
 	@cd $(BUILD_PATH) && zip -rq $(PACKAGE_NAME).zip $(PACKAGE_NAME)
 	@cd $(BUILD_PATH) && tar -czf $(PACKAGE_NAME).tar.gz $(PACKAGE_NAME)
 	@cd $(BUILD_PATH) && tar -czf $(PACKAGE_NAME).tar.gz $(PACKAGE_NAME)

+ 13 - 3
README-CN.md

@@ -147,11 +147,21 @@ Kuiper 可以运行在各类物联网的边缘使用场景中,比如工业物
 
 
 #### 编译
 #### 编译
 
 
-+ 编译二进制:``$ make``
++ 编译二进制:
 
 
-+ 安装文件打包:`` $ make pkg``
+  - 编译二进制文件: `$ make`
 
 
-+ Docker 镜像:``$ make docker``
+  - 编译支持 EdgeX 的二进制文件: `$ make build_with_edgex`
+
++ 安装文件打包:
+
+  - 安装文件打包:: `$ make pkg`
+
+  - 支持 EdgeX 的安装文件打包: `$ make pkg_with_edgex`
+
++ Docker 镜像:`$ make docker`
+
+  > Docker 镜像默认支持 EdgeX
 
 
 
 
 如果您要实现交叉编译,请参考[此文档](docs/zh_CN/cross-compile.md)。
 如果您要实现交叉编译,请参考[此文档](docs/zh_CN/cross-compile.md)。

+ 15 - 3
README.md

@@ -147,9 +147,21 @@ It can be run at various IoT edge use scenarios, such as real-time processing of
 
 
 #### Compile
 #### Compile
 
 
-- Binary: ``$ make``
-- Packages: `` $ make pkg``
-- Docker images: ``$ make docker``
++ Binary: 
+
+  - Binary: `$ make`
+
+  - Binary files that support EdgeX: `$ make build_with_edgex`
+
++ Packages: `` $ make pkg``
+
+  - Packages: `$ make pkg`
+
+  - Packages files that support EdgeX: `$ make pkg_with_edgex`
+
++ Docker images: `$ make docker`
+
+  > Docker images support EdgeX by default
 
 
 To using cross-compilation, refer to [this doc](docs/en_US/cross-compile.md).
 To using cross-compilation, refer to [this doc](docs/en_US/cross-compile.md).