Skip to content

Commit

Permalink
updated makefile with multiple binary targets
Browse files Browse the repository at this point in the history
  • Loading branch information
10d9e committed Jun 3, 2023
1 parent 6bc7a47 commit 599dd2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ GOTEST = $(GOCMD) test
GOGET = $(GOCMD) get
BINARY_NAME = donut
BINARY_UNIX = $(BINARY_NAME)_unix
BINARY_WINDOWS = $(BINARY_NAME).exe

all: test build
build:
Expand All @@ -16,10 +17,15 @@ clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
rm -f $(BINARY_UNIX)
rm -f $(BINARY_WINDOWS)
run:
$(GOBUILD) -o $(BINARY_NAME) -v
./$(BINARY_NAME)
deps:
$(GOGET) ./...
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_UNIX) -v
build-mac:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)_macos -v
build-windows:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_WINDOWS) -v

0 comments on commit 599dd2e

Please sign in to comment.