diff --git a/Makefile b/Makefile index a4c224aa..4d4b41d1 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,14 @@ else GOM=gom endif +UNAME := $(shell uname) + +ifeq ($(UNAME), Darwin) +GOLDFLAGS= +else +GOLDFLAGS=--ldflags='-extldflags -static' +endif + all: test check system-test prepare: @@ -40,7 +48,7 @@ check: $(GOM) exec golint $(ALL_PACKAGES:%=./%) install: - $(GOM) build -o $(BINPATH)/aptly + $(GOM) build -o $(BINPATH)/aptly $(GOLDFLAGS) system-test: install if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi