Set CGO_ENABLED=0 for all platforms, closes #8
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,14 +1,14 @@
|
|||||||
SRC:=config.go ipc.go options.go $(wildcard cmd/open-in-mpv/*)
|
SRC:=config.go ipc.go options.go $(wildcard cmd/open-in-mpv/*)
|
||||||
EXT_SRC:=$(wildcard extension/Chrome/*) extension/Firefox/manifest.json
|
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:
|
builddir:
|
||||||
@mkdir -p build/linux build/windows build/mac
|
@mkdir -p build/linux build/windows build/mac
|
||||||
|
|
||||||
build/linux/open-in-mpv: $(SRC) builddir
|
build/linux/open-in-mpv: $(SRC) builddir
|
||||||
@echo -e "\n# Building for Linux"
|
@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/install-protocol.sh $(dir $@)
|
||||||
cp scripts/open-in-mpv.desktop $(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
|
@# and https://apple.stackexchange.com/questions/253184/associating-protocol-handler-in-mac-os-x
|
||||||
@echo -e "\n# Building MacOS app bundle"
|
@echo -e "\n# Building MacOS app bundle"
|
||||||
@mkdir -p $@/Contents
|
@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 config.yml $@/Contents/MacOS/
|
||||||
cp scripts/Info.plist $@/Contents
|
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
|
build/windows/open-in-mpv.exe: $(SRC) builddir
|
||||||
@echo -e "\n# Building for Windows"
|
@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 $@)
|
cp scripts/install-protocol.reg $(dir $@)
|
||||||
|
|
||||||
build/windows.tar: build/windows/open-in-mpv.exe
|
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)
|
build/firefox.zip: $(EXT_SRC)
|
||||||
@mkdir -p build
|
@mkdir -p build
|
||||||
cp -t extension/Firefox extension/Chrome/{*.html,*.js,*.png,*.css}
|
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}
|
@rm extension/Firefox/{*.html,*.js,*.png,*.css}
|
||||||
|
|
||||||
install: build/linux/open-in-mpv
|
install: build/linux/open-in-mpv
|
||||||
|
Reference in New Issue
Block a user