-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.build
36 lines (30 loc) · 1.33 KB
/
Makefile.build
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
KUBESERIAL_BUILD_OUTPUT_PATH ?= build/_output/bin/kubeserial
DEVICE_MONITOR_BUILD_OUTPUT_PATH ?= build/_output/bin/device-monitor
INJECTOR_WEBHOOK_BUILD_OUTPUT_PATH ?= build/_output/bin/injector-webhook
##@ Build
.PHONY: kubeserial
kubeserial: ## Build manager binary.
kubeserial: BUILD_PATH=cmd/manager/main.go
kubeserial: OUTPUT_PATH=${KUBESERIAL_BUILD_OUTPUT_PATH}
kubeserial:
go build ${BUILD_EXTRA_OPTS} -o ${OUTPUT_PATH} ${BUILD_PATH}
.PHONY: device-monitor
device-monitor: ## Build device monitor binary
device-monitor: BUILD_PATH=cmd/device-monitor/main.go
device-monitor: OUTPUT_PATH=${DEVICE_MONITOR_BUILD_OUTPUT_PATH}
device-monitor:
go build ${BUILD_EXTRA_OPTS} -o ${OUTPUT_PATH} ${BUILD_PATH}
.PHONY: injector-webhook
injector-webhook: ## Build sidecar injector webhook binary binary
injector-webhook: BUILD_PATH=cmd/webhook/main.go
injector-webhook: OUTPUT_PATH=${INJECTOR_WEBHOOK_BUILD_OUTPUT_PATH}
injector-webhook:
go build ${BUILD_EXTRA_OPTS} -o ${OUTPUT_PATH} ${BUILD_PATH}
.PHONY: all
all: device-monitor injector-webhook kubeserial ## Run codegen and build all components.
.PHONY: clean
clean: KUBESERIAL_PATH=${KUBESERIAL_BUILD_OUTPUT_PATH}
clean: MONITOR_PATH=${DEVICE_MONITOR_BUILD_OUTPUT_PATH}
clean: INJECTOR_WEBHOOK_PATH=${INJECTOR_WEBHOOK_BUILD_OUTPUT_PATH}
clean:
rm ${KUBESERIAL_PATH} ${MONITOR_PATH} ${INJECTOR_WEBHOOK_PATH}