Update Makefile to follow build/install conventions for Go packages

master
Michael Dvorkin 9 years ago
parent 83e9055ce8
commit d4ad5ab7d5
  1. 1
      .gitignore
  2. 20
      Makefile
  3. 0
      bin/.gitkeep
  4. 0
      cmd/mop/main.go

1
.gitignore vendored

@ -15,5 +15,6 @@ tmtags
# Builds and logs. # Builds and logs.
mop mop
bin/mop*
logs/* logs/*

@ -1,8 +1,22 @@
# Copyright (c) 2013-2016 by Michael Dvorkin. All Rights Reserved.
# Use of this source code is governed by a MIT-style license that can
# be found in the LICENSE file.
VERSION = 0.2.0
PACKAGE = github.com/michaeldv/mop/cmd/mop
run: run:
go run ./cmd/mop.go go run ./cmd/mop/main.go
build: build:
go build ./cmd/mop.go go build -x $(PACKAGE)
install: install:
go install github.com/michaeldv/mop/cmd go install -x $(PACKAGE)
buildall:
GOOS=darwin GOARCH=amd64 go build $(GOFLAGS) -o ./bin/mop-$(VERSION)-osx-64 $(PACKAGE)
GOOS=freebsd GOARCH=amd64 go build $(GOFLAGS) -o ./bin/mop-$(VERSION)-freebsd-64 $(PACKAGE)
GOOS=linux GOARCH=amd64 go build $(GOFLAGS) -o ./bin/mop-$(VERSION)-linux-64 $(PACKAGE)
GOOS=windows GOARCH=amd64 go build $(GOFLAGS) -o ./bin/mop-$(VERSION)-windows-64.exe $(PACKAGE)
GOOS=windows GOARCH=386 go build $(GOFLAGS) -o ./bin/mop-$(VERSION)-windows-32.exe $(PACKAGE)
Loading…
Cancel
Save