Skip to content

Commit

Permalink
refactor(makefile): naming
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyoptimist committed Aug 2, 2024
1 parent 7a10ba4 commit be8239f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
APP_NAME=screen

.PHONY: build-linux build-windows build-mac all
.PHONY: linux windows mac all

build-linux:
linux:
@echo "Building for Linux"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./dist/linux/$(APP_NAME)-server-linux -tags netgo -ldflags "-w -s" ./cmd/server/
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./dist/linux/$(APP_NAME)-client-linux -tags netgo -ldflags "-w -s" ./cmd/client/
build-windows:
windows:
@echo "Building for Windows"
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./dist/windows/$(APP_NAME)-server.exe -tags netgo -ldflags "-w -s" ./cmd/server/
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./dist/windows/$(APP_NAME)-client.exe -tags netgo -ldflags "-w -s" ./cmd/client/
build-mac:
mac:
@echo "Building for Mac"
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o ./dist/mac/$(APP_NAME)-server-darwin -tags netgo -ldflags "-w -s" ./cmd/server/
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o ./dist/mac/$(APP_NAME)-client-darwin -tags netgo -ldflags "-w -s" ./cmd/client/
all: build-linux build-windows build-mac
all: linux windows mac

0 comments on commit be8239f

Please sign in to comment.