$OpenBSD: patch-makefile,v 1.14 2019/03/09 05:33:59 ajacoutot Exp $

Index: makefile
--- makefile.orig
+++ makefile
@@ -47,7 +47,7 @@ checkstyle::
 coverage:: build-linux
 	$(BGO_SPACE)/Tools/src/coverage.sh github.com/aws/amazon-ssm-agent/agent/...
 
-build:: build-linux build-freebsd build-windows build-linux-386 build-windows-386 build-arm build-arm64 build-darwin
+build:: build-linux build-freebsd build-openbsd build-windows build-linux-386 build-windows-386 build-arm build-arm64 build-darwin
 
 prepack:: cpy-plugins prepack-linux prepack-linux-arm64 prepack-linux-386 prepack-windows prepack-windows-386
 
@@ -224,6 +224,22 @@ build-darwin-386: checkstyle copy-src pre-build
 		$(BGO_SPACE)/agent/cli-main/cli-main.go
 	GOOS=darwin GOARCH=386 $(GO_BUILD) -ldflags "-s -w" -o $(BGO_SPACE)/bin/darwin_386/ssm-document-worker -v \
 								$(BGO_SPACE)/agent/framework/processor/executer/outofproc/worker/main.go
+
+.PHONY: build-openbsd
+build-openbsd: copy-src pre-build
+	@echo "Build for openbsd agent"
+	GOOS=openbsd GOARCH=amd64 go build -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_amd64/amazon-ssm-agent -v \
+	$(BGO_SPACE)/agent/agent.go $(BGO_SPACE)/agent/agent_unix.go $(BGO_SPACE)/agent/agent_parser.go
+	GOOS=openbsd GOARCH=amd64 $(GO_BUILD) -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_amd64/ssm-cli -v \
+            $(BGO_SPACE)/agent/cli-main/cli-main.go
+
+.PHONY: build-openbsd-386
+build-openbsd-386: copy-src pre-build
+	@echo "Build for openbsd agent"
+	GOOS=openbsd GOARCH=386 go build -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_386/amazon-ssm-agent -v \
+	$(BGO_SPACE)/agent/agent.go $(BGO_SPACE)/agent/agent_unix.go $(BGO_SPACE)/agent/agent_parser.go
+	GOOS=openbsd GOARCH=386 $(GO_BUILD) -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_386/ssm-cli -v \
+	$(BGO_SPACE)/agent/cli-main/cli-main.go
 
 .PHONY: build-windows-386
 build-windows-386: checkstyle copy-src pre-build
