summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-12-29 22:08:29 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-12-29 22:08:29 (GMT)
commitd69690925f67f458ff6c52ce80bb15dca67cd7c6 (patch)
tree3d917d834cc9a176ff80e4f2b776766b5dba853f
parent2214280f98682c8a7c9dc3677d12c3d8a811f8b4 (diff)
set correct build tags for gtk version
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
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: