From 09563f290fd36234285440551f444f413e6e067b Mon Sep 17 00:00:00 2001 From: Bike Dude Date: Sat, 20 Mar 2021 11:46:00 +0100 Subject: [PATCH] Adding FreeBSD compatibility --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0e10362..5bdbed3 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,16 @@ LOCAL_RPMS=RPMS UNAME=$(shell uname) ifeq ($(UNAME), Darwin) TARGET=osx -else +endif +ifeq ($(UNAME), FreeBSD) + TARGET=freebsd +endif +ifeq ($(UNAME), Linux) TARGET=linux endif +ifneq ($(UNAME),$(filter $(UNAME),Darwin FreeBSD Linux)) + $(error error: Unkown OS ) +endif all: $(TARGET) @echo "Built $(VERSION) @ $(TARGET)" @@ -36,6 +43,9 @@ osx: linux: GO111MODULE=on GOARCH=$(ARCH) GOOS=linux go build -o $(PROG)-linux-$(ARCH) +freebsd: + GO111MODULE=on GOARCH=$(ARCH) GOOS=freebsd go build -o $(PROG)-freebsd-$(ARCH) + build_server: ifeq ($(BUILD_SERVER), '')