diff --git a/Makefile b/Makefile index 5d8e75d..2279771 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,52 @@ -build: - GOOS=linux GOARCH=amd64 go build -o=pluto.linux.amd64 - GOOS=linux GOARCH=386 go build -o=pluto.linux.i386 - GOOS=windows GOARCH=amd64 go build -o=pluto.amd64.exe - GOOS=windows GOARCH=386 go build -o=pluto.i386.exe - -clean: - rm pluto.linux.i386 - rm pluto.linux.amd64 - rm pluto.i386.exe - rm pluto.amd64.exe \ No newline at end of file +PACKAGE=pluto +VERSION=1.4 + +ARCH_LINUX = $(PACKAGE)-$(VERSION)-linux-amd64 \ + $(PACKAGE)-$(VERSION)-linux-arm64 \ + $(PACKAGE)-$(VERSION)-linux-386 + +ARCH_WIN = $(PACKAGE)-$(VERSION)-windows-amd64.exe \ + $(PACKAGE)-$(VERSION)-windows-386.exe + +TARGET = $(PACKAGE)-$(VERSION)-linux-amd64 + +# TODO: Must write a configure.ac to find target for user end. +# then we can use: +# all: default +# default: $(TARGET) + +all: default +default: $(TARGET) + +dist: dist-linux dist-windows + +dist-windows: $(ARCH_WIN) +dist-linux: $(ARCH_LINUX) + +$(PACKAGE)-$(VERSION)-linux-arm64: + GOOS=linux \ + GOARCH=arm64 \ + go build -o=$@ + +$(PACKAGE)-$(VERSION)-linux-amd64: + GOOS=linux \ + GOARCH=amd64 \ + go build -o=$@ + +$(PACKAGE)-$(VERSION)-linux-386: + GOOS=linux \ + GOARCH=386 \ + go build -o=$@ + +$(PACKAGE)-$(VERSION)-windows-amd64.exe: + GOOS=windows \ + GOARCH=amd64 \ + go build -o=$@.exe + +$(PACKAGE)-$(VERSION)-windows-386.exe: + GOOS=windows \ + GOARCH=386 \ + go build -o=$@.exe + +dist-clean: + rm -f $(ARCH_WIN) $(ARCH_LINUX) diff --git a/README.md b/README.md index 502595a..38d810c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ There are a lot of tool similar and better than Pluto but most of them have an u [![GoDoc](https://godoc.org/github.com/ishanjain28/pluto/pluto?status.svg)](https://godoc.org/github.com/ishanjain28/pluto/pluto) [![Go Report Card](https://goreportcard.com/badge/github.com/ishanjain28/pluto)](https://goreportcard.com/report/github.com/ishanjain28/pluto) +[![Build Status](https://travis-ci.org/ishanjain28/pluto.svg?branch=master)](https://travis-ci.org/ishanjain28/pluto) ## Installation @@ -101,4 +102,4 @@ But when I am downloading a file from my private servers I need the absolute max # License -MIT \ No newline at end of file +GPLv2 \ No newline at end of file