diff --git a/Makefile b/Makefile index 668b024..7ccbe43 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ SRC:=config.go ipc.go options.go $(wildcard cmd/open-in-mpv/*) EXT_SRC:=$(wildcard extension/Chrome/*) extension/Firefox/manifest.json -all: build/linux.tar build/mac.tar build/windows.tar +all: build/linux.tar build/mac.tar build/windows.tar build/firefox.zip builddir: @mkdir -p build/linux build/windows build/mac build/linux/open-in-mpv: $(SRC) builddir @echo -e "\n# Building for Linux" - env GOOS=linux GOARCh=amd64 go build -ldflags="-s -w" -o $@ ./cmd/open-in-mpv + env CGO_ENABLED=0 GOOS=linux GOARCh=amd64 go build -ldflags="-s -w" -o $@ ./cmd/open-in-mpv cp scripts/install-protocol.sh $(dir $@) cp scripts/open-in-mpv.desktop $(dir $@) @@ -20,7 +20,7 @@ build/mac/open-in-mpv.app: $(SRC) scripts/Info.plist builddir @# and https://apple.stackexchange.com/questions/253184/associating-protocol-handler-in-mac-os-x @echo -e "\n# Building MacOS app bundle" @mkdir -p $@/Contents - env GOOS=darwin GOARCh=amd64 go build -ldflags="-s -w" -o $@/Contents/MacOS/open-in-mpv ./cmd/open-in-mpv + env CGO_ENABLED=0 GOOS=darwin GOARCh=amd64 go build -ldflags="-s -w" -o $@/Contents/MacOS/open-in-mpv ./cmd/open-in-mpv cp config.yml $@/Contents/MacOS/ cp scripts/Info.plist $@/Contents @@ -29,7 +29,7 @@ build/mac.tar: build/mac/open-in-mpv.app build/windows/open-in-mpv.exe: $(SRC) builddir @echo -e "\n# Building for Windows" - env GOOS=windows GOARCh=amd64 go build -ldflags="-s -w -H windowsgui" -o $@ ./cmd/open-in-mpv + env CGO_ENABLED=0 GOOS=windows GOARCh=amd64 go build -ldflags="-s -w -H windowsgui" -o $@ ./cmd/open-in-mpv cp scripts/install-protocol.reg $(dir $@) build/windows.tar: build/windows/open-in-mpv.exe @@ -38,7 +38,7 @@ build/windows.tar: build/windows/open-in-mpv.exe build/firefox.zip: $(EXT_SRC) @mkdir -p build cp -t extension/Firefox extension/Chrome/{*.html,*.js,*.png,*.css} - zip -r build/Firefox.zip extension/Firefox/ + zip -j $@ extension/Firefox/* @rm extension/Firefox/{*.html,*.js,*.png,*.css} install: build/linux/open-in-mpv