-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
.PHONY: build | ||
.PHONY: build build_darwin_x64 build_windows_x64 | ||
|
||
game = pong | ||
|
||
compile-assets: | ||
@go generate assets/generate.go | ||
@echo "[OK] Pong static assets compiled!" | ||
@echo "[OK] $(game) static assets compiled!" | ||
|
||
build: compile-assets build_darwin_x64 build_windows_x64 | ||
@echo "[OK] $(game) binary was created!" | ||
|
||
build_darwin_x64: | ||
@GOOS=darwin GOARCH=amd64 go build -o ./build/macos-x64/$(game) | ||
|
||
build: compile-assets | ||
@go build -o ./build/pong *.go | ||
@echo "[OK] Pong binary was created!" | ||
build_windows_x64: | ||
@GOOS=windows GOARCH=amd64 go build -o ./build/windows-x64/$(game).exe | ||
|
||
run: build | ||
@./build/pong | ||
run: | ||
go run *.go | ||
|
||
clean: | ||
rm -rf build | ||
rm -rf build | ||
rm -rf assets/**/*.generated.go |