~welt/murse

ref: devel murse/Makefile -rw-r--r-- 1.4 KiB
cfb166c0welt Update Makefile for new packaging. 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.POSIX:

VERSION := unknown

default:
	go build -tags netgo -ldflags '-s -w' -o build/linux/murse


release: clean linux linux386 windows windows386 archive
release-sign: clean linux linux386 windows windows386 sign archive

clean:
	rm -rf build 
linux:
	mkdir -p build/linux/amd64
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-s -w' -o build/linux/amd64/murse
linux386:
	mkdir -p build/linux/386
	CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -tags netgo -ldflags '-s -w' -o build/linux/386/murse
windows:
	mkdir -p build/windows/amd64
	CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -tags netgo -ldflags "-s -w" -o build/windows/amd64/murse.exe 
windows386:
	mkdir -p build/windows/386
	CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -tags netgo -ldflags "-s -w" -o build/windows/386/murse.exe 
sign:
	gpg --output build/linux/amd64/murse.sig --detach-sig build/linux/amd64/murse
	gpg --output build/linux/386/murse.sig --detach-sig build/linux/386/murse
	gpg --output build/windows/amd64/murse.exe.sig --detach-sig build/windows/amd64/murse.exe
	gpg --output build/windows/386/murse.exe.sig --detach-sig build/windows/386/murse.exe
archive:
	tar czf build/murse-$(VERSION)-linux-amd64.tar.gz build/linux/amd64/*
	tar czf build/murse-$(VERSION)-linux-386.tar.gz build/linux/386/*
	zip build/murse-$(VERSION)-windows-amd64.zip build/windows/amd64/*
	zip build/murse-$(VERSION)-windows-386.zip build/windows/386/*