Skip to content

Commit

Permalink
Fix makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
emilioastarita committed Feb 24, 2020
1 parent 157c328 commit 3b7b6d5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.PHONY: clean run build release format
.PHONY: clean run build release format releases release-linux release-windows release-darwin
GOCMD=go
GOBUILD=$(GOCMD) build
GOFMT=$(GOCMD) fmt
GOGENERATE=$(GOCMD) generate
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=$(realpath build/lyricfier)
BUILD_FOLDER=$(realpath build/)
BINARY_NAME=$(BUILD_FOLDER)/lyricfier
STATICS_DIR=$(realpath lyricfier/)
GO_SOURCES:=$(shell find lyricfier/ -type f -name '*.go')
GO_SOURCES_INTERNAL:=$(shell find internal/ -type f -name '*.go')
Expand All @@ -21,6 +22,11 @@ release-windows: $(GO_SOURCES) $(GO_SOURCES_INTERNAL) $(STATIC_EMBEDED)
release-darwin: $(GO_SOURCES) $(GO_SOURCES_INTERNAL) $(STATIC_EMBEDED)
cd lyricfier/ ; env GOOS=darwin GOARCH=amd64 $(GOBUILD) -v -o $(BINARY_NAME)-darwin-amd64 ; cd -

release-linux: $(GO_SOURCES) $(GO_SOURCES_INTERNAL) $(STATIC_EMBEDED)
cd lyricfier/ ; env GOOS=linux GOARCH=amd64 $(GOBUILD) -v -o $(BINARY_NAME)-linux-amd64 ; cd -

releases: release-darwin release-linux release-windows

$(BINARY_NAME): $(GO_SOURCES) $(GO_SOURCES_INTERNAL) $(STATIC_EMBEDED)
$(GOBUILD) -o $(BINARY_NAME) -v $(GO_SOURCES)

Expand Down

0 comments on commit 3b7b6d5

Please sign in to comment.