From d69690925f67f458ff6c52ce80bb15dca67cd7c6 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 29 Dec 2016 23:08:29 +0100 Subject: set correct build tags for gtk version diff --git a/Makefile b/Makefile index 80ed5a0..44d68ff 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,10 @@ curdir:= $(shell pwd) GOCMD := GOPATH=$(curdir) go +ifdef GOROOT +GOCMD = GOPATH=$(curdir) $(GOROOT)/bin/go +endif +BUILDOPTS := -tags $(shell pkg-config --modversion gtk+-3.0 | sed 's/^\(.*\)\.\(.*\)\..*/gtk_\1_\2/') EXECUTEABLE := rhlibrary @@ -38,10 +42,10 @@ all: build getlibs: - @$(foreach lib,$(LIBS), echo "fetching lib: $(lib)"; $(GOCMD) get $(lib);) + @$(foreach lib,$(LIBS), echo "fetching lib: $(lib)"; $(GOCMD) get -d $(lib);) updatelibs: - @$(foreach lib,$(LIBS), echo "updating lib: $(lib)"; $(GOCMD) get -u $(lib);) + @$(foreach lib,$(LIBS), echo "updating lib: $(lib)"; $(GOCMD) get -d -u $(lib);) vet: @echo "vetting: $(EXECUTEABLE)" @@ -53,7 +57,7 @@ format: build: getlibs @echo "installing: $(EXECUTEABLE)" - @$(GOCMD) install $(EXECUTEABLE) + @$(GOCMD) install $(BUILDOPTS) $(EXECUTEABLE) clean: -- cgit v0.10.2