-
Notifications
You must be signed in to change notification settings - Fork 0
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
gpskwlkr
committed
Mar 30, 2024
1 parent
3e92a6a
commit 713f41f
Showing
7 changed files
with
110 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,6 @@ Cargo.lock | |
*.pdb | ||
|
||
shell.nix | ||
|
||
*.zip | ||
*.tar.gz |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Define the targets and their respective filenames | ||
TARGET_LINUX = x86_64-unknown-linux-gnu | ||
TARGET_WINDOWS = x86_64-pc-windows-gnu | ||
OUT_DIR_LINUX = target/$(TARGET_LINUX)/release | ||
OUT_DIR_WINDOWS = target/$(TARGET_WINDOWS)/release | ||
PROJECT_NAME = protondb-check | ||
TAR_FILE = $(PROJECT_NAME)_$(TARGET_LINUX).tar.gz | ||
ZIP_FILE = $(PROJECT_NAME)_$(TARGET_WINDOWS).zip | ||
|
||
# Default target | ||
all: build pack | ||
|
||
linux: | ||
cargo build --release --target=$(TARGET_LINUX) | ||
tar -czvf $(TAR_FILE) -C $(OUT_DIR_LINUX) $(PROJECT_NAME) | ||
|
||
windows: | ||
cargo build --release --target=$(TARGET_WINDOWS) | ||
zip -r $(ZIP_FILE) $(OUT_DIR_WINDOWS)/$(PROJECT_NAME).exe | ||
|
||
# Build the project for Linux and Windows | ||
build: | ||
cargo build --release --target=$(TARGET_LINUX) | ||
cargo build --release --target=$(TARGET_WINDOWS) | ||
|
||
# Pack the built binaries | ||
pack: | ||
tar -czvf $(TAR_FILE) -C $(OUT_DIR_LINUX) $(PROJECT_NAME) | ||
zip -r $(ZIP_FILE) $(OUT_DIR_WINDOWS)/$(PROJECT_NAME).exe | ||
|
||
# Clean up the build artifacts | ||
clean: | ||
cargo clean | ||
rm -f $(TAR_FILE) $(ZIP_FILE) | ||
|
||
.PHONY: all build pack clean | ||
|
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
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