summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgy95 <guoyao17@huawei.com>2022-03-30 14:51:00 +0800
committergy95 <guoyao17@huawei.com>2022-04-06 10:59:42 +0800
commit0bd2d508040b774f5678e318fe7747dadc7d3599 (patch)
tree481e001e5766d146d5aee04955f65889da482224 /Makefile
parentMerge pull request #3750 from vincentgoat/optimize_sendobj (diff)
downloadkubeedge-0bd2d508040b774f5678e318fe7747dadc7d3599.tar.gz
support compile binaries with golang images
Signed-off-by: gy95 <guoyao17@huawei.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4ec131fc5..784cd140e 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,8 @@ COMPONENTS=cloud \
.EXPORT_ALL_VARIABLES:
OUT_DIR ?= _output/local
+RUN = hack/make-rules/build_with_container.sh
+
define ALL_HELP_INFO
# Build code.
#
@@ -40,12 +42,20 @@ define ALL_HELP_INFO
# to "-N -l" to disable optimizations and inlining, this will be helpful when you want to
# use the debugging tools like delve. When GOLDFLAGS is unspecified, it defaults to "-s -w" which strips
# debug information, see https://golang.org/cmd/link for other flags.
+#
+# Set the environment variable or arg BUILD_WITH_CONTAINER to build inside container,
+# only docker and make are required in this mode.
+# 1) make all WHAT=cloudcore BUILD_WITH_CONTAINER=true
+# 2) export BUILD_WITH_CONTAINER=true && make all WHAT=cloudcore
endef
.PHONY: all
ifeq ($(HELP),y)
all: clean
@echo "$$ALL_HELP_INFO"
+else ifeq ($(BUILD_WITH_CONTAINER),true)
+all:
+ $(RUN) hack/make-rules/build.sh $(WHAT)
else
all:
KUBEEDGE_OUTPUT_SUBPATH=$(OUT_DIR) hack/make-rules/build.sh $(WHAT)