-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
38 lines (32 loc) · 1009 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
GOOS := $(shell go env GOOS)
GOARCH := $(shell go env GOARCH)
ENVOY_BUILD_TAG := main
BUILD_ENVOY_SCRIPT ?= scripts/build_$(GOOS).sh
ifeq ($(ENVOY_DISTRO),centos)
ARTIFACT_EXT ?= -centos
BUILD_ENVOY_SCRIPT = scripts/build_centos.sh
endif
SOURCE_DIR ?= ${TMPDIR}envoy-sources
ifndef TMPDIR
SOURCE_DIR ?= /tmp/envoy-sources
endif
ifneq ($(ENVOY_VERSION),main)
ENVOY_BUILD_TAG=v$(ENVOY_VERSION)
endif
.PHONY: build/envoy/fips
build/envoy/fips:
BAZEL_BUILD_EXTRA_OPTIONS="${BAZEL_BUILD_EXTRA_OPTIONS} --define boringssl=fips" \
ARTIFACT_EXT="+fips" $(MAKE) build/envoy
.PHONY: build/envoy
build/envoy:
ENVOY_TAG=$(ENVOY_BUILD_TAG) \
SOURCE_DIR=${SOURCE_DIR} \
GOARCH=${GOARCH} \
GOOS=${GOOS} \
BAZEL_BUILD_EXTRA_OPTIONS="${BAZEL_BUILD_EXTRA_OPTIONS}" \
BINARY_PATH=build/artifacts-${GOOS}-${GOARCH}/envoy/envoy-${ENVOY_BUILD_TAG}$(ARTIFACT_EXT) $(BUILD_ENVOY_SCRIPT)
.PHONY: clean/envoy
clean/envoy:
rm -rf ${SOURCE_DIR}
rm -rf build/artifacts-${GOOS}-${GOARCH}/envoy/
rm -rf build/envoy/