From 892a770265bb9f4ecd8aed870228d238099a0afc Mon Sep 17 00:00:00 2001 From: Igor Drozdov Date: Fri, 27 Jan 2023 10:40:28 +0100 Subject: Specify CGO_CFLAGS in Makefile to compile gssapi lib --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index ca483fe..290a783 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .PHONY: validate verify verify_ruby verify_golang test test_ruby test_golang coverage coverage_golang setup _script_install build compile check clean install FIPS_MODE ?= 0 +OS := $(shell uname) GO_SOURCES := $(shell find . -name '*.go') VERSION_STRING := $(shell git describe --match v* 2>/dev/null || awk '$$0="v"$$0' VERSION 2>/dev/null || echo unknown) BUILD_TIME := $(shell date -u +%Y%m%d.%H%M%S) @@ -14,6 +15,11 @@ ifeq (${FIPS_MODE}, 1) export CGO_ENABLED=1 endif +ifeq (${OS}, Darwin) # Mac OS + # To be able to compile gssapi library + export CGO_CFLAGS="-I/opt/homebrew/opt/heimdal/include" +endif + GOBUILD_FLAGS := -ldflags "-X main.Version=$(VERSION_STRING) -X main.BuildTime=$(BUILD_TIME)" -tags "$(BUILD_TAGS)" -mod=mod PREFIX ?= /usr/local -- cgit v1.2.1