define INFO_PLIST LSUIElement 1 CFBundleExecutable sshproxytray endef export INFO_PLIST ifeq ($(OS),Windows_NT) OS = win else UNAME := $(shell uname -s) ifeq ($(UNAME),Darwin) OS = mac else ifeq ($(UNAME),Linux) OS = linux else $(error OS not supported by this Makefile) endif endif build: build-$(OS) install: install-$(OS) build-mac: mkdir -p dist/SshProxyTray.app/Contents/{MacOS,Resources} echo $$INFO_PLIST > dist/SshProxyTray.app/Contents/Info.plist go build -o dist/SshProxyTray.app/Contents/MacOS/sshproxytray main.go install-mac: cp -r dist/SshProxyTray.app /Applications build-linux: mkdir dist go build -o dist/sshproxytray main.go install-linux: mv dist/sshproxytray /usr/local/bin/sshproxytray