Skip to content

Commit

Permalink
add cross compile targets
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed May 1, 2020
1 parent 050355b commit 52e0aeb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/gdoc2pdf
/gdoc2pdf*
/checksums.txt*
/*.pdf
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
buildflags := -ldflags "-w -s -X main.Version=$(shell git describe --abbrev=4 --dirty --always --tags)" -tags netgo,osusergo
gdoc2pdf: *.go
go build -o $@ $(buildflags)
gdoc2pdf.exe: *.go
env GOOS=windows GOARCH=amd64 go build $(buildflags) -o $@
gdoc2pdf-osx: *.go
env GOOS=darwin GOARCH=amd64 go build $(buildflags) -o $@
checksums.txt:
sha256sum gdoc2pdf* > checksums.txt
gpg --armor --detach-sign checksums.txt
release: clean gdoc2pdf gdoc2pdf.exe gdoc2pdf-osx checksums.txt
clean:
rm -f gdoc2pdf
rm -f gdoc2pdf gdoc2pdf.exe gdoc2pdf-osx checksums.txt checksums.txt.asc
.PHONY += clean

0 comments on commit 52e0aeb

Please sign in to comment.