Skip to content

Commit

Permalink
add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
LordCasser committed Jun 6, 2024
1 parent 7d50415 commit 9547360
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
WINDOWS_TARGET=x86_64-pc-windows-gnu
LINUX_TARGET=x86_64-unknown-linux-musl

all: windows linux

linux:
cargo build --target $(LINUX_TARGET) --release
upx --best --lzma target/x86_64-unknown-linux-musl/release/weggli-enhance
cp target/x86_64-unknown-linux-musl/release/weggli-enhance .

windows:
cargo build --target $(WINDOWS_TARGET) --release
upx --best --lzma target/x86_64-pc-windows-gnu/release/weggli-enhance.exe
cp target/x86_64-pc-windows-gnu/release/weggli-enhance.exe .

clean:
cargo clean
rm weggli-enhance weggli-enhance.exe
2 changes: 1 addition & 1 deletion src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl<'a> DisplayHelper<'a> {
}

if enable_line_numbers {
let mut tmp = format!("{:>4}", line_nr + 1).bold().on_white();
let tmp = format!("{:>4}", line_nr + 1).bold().on_white();
result += (tmp.to_string() + " ").as_str()
}
result += &self.format(*offset, l, 0);
Expand Down

0 comments on commit 9547360

Please sign in to comment.