$OpenBSD: patch-makefile,v 1.11 2018/09/18 11:36:23 ajacoutot Exp $

Index: makefile
--- makefile.orig
+++ makefile
@@ -42,12 +42,12 @@ export BRAZIL_BUILD
 
 checkstyle::
 #   Run checkstyle script
-	$(BGO_SPACE)/Tools/src/checkstyle.sh
+#	$(BGO_SPACE)/Tools/src/checkstyle.sh
 
 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-darwin
+build:: build-linux build-freebsd build-openbsd build-windows build-linux-386 build-windows-386 build-arm build-darwin
 
 prepack:: cpy-plugins prepack-linux prepack-linux-386 prepack-windows prepack-windows-386
 
@@ -221,6 +221,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: checkstyle 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: checkstyle 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
