Skip to content

Commit

Permalink
Improved makefile build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
theRookieCoder committed Nov 7, 2021
1 parent 1cec37a commit b9104b7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/out
.DS_Store
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

[![rust badge](https://img.shields.io/static/v1?label=Made%20with&message=Rust&style=for-the-badge&logo=rust&labelColor=e82833&color=b11522)](https://www.rust-lang.org/) [![license badge](https://img.shields.io/github/license/theRookieCoder/ferium?style=for-the-badge)](https://github.com/theRookieCoder/ferium/blob/main/LICENSE.txt) [![copyleft badge](https://img.shields.io/static/v1?label=&message=Copyleft&style=for-the-badge&labelColor=silver&color=silver&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAQAAAC0NkA6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfjAxYBNgYPa+9oAAAEM0lEQVRYw6WYb0zVVRjHP9wQW7umA0xoKNSC+6bSNkzetKZbaVu19aLpfOGcbcw/S+uNbikuNwMsVyE3XVsro7VEXjS3ylmLxkRtC9crHGjCAv9AATK4CoZye8Hl/J7n/M7v8rvX57w55/lznt/583yf5/xyCEOlrKaSCp6ggCiQYJheLvMHv9HHA1MZ++kmmaZ1UUNZ9g6eo4X7aR3Mtvs0syJzB0U0MR3KgddOsiQTFxsZzdDBTLvFetd0OT5OHo1U+7j9tNJBN4MkgChFVLCS1Sz1aR7jHf5Lv4Yov1hfN8YRKgP1V9LIuGVxhmg6Fwv4XalPcJD8OTe3gA+YVHYXgt3kWato46nQp1jOWWs1eW7Fz5VaLbkZ3cdc6pX9UfeNkvd+a1aRtV3Fle+mL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QwMTo1NDowNiswMDowMOIizoUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDMtMjJUMDE6NTQ6MDYrMDA6MDCTf3Y5AAAAAElFTkSuQmCC)](https://en.wikipedia.org/wiki/Copyleft)

Ferium is an open source and easy to use package manager for Minecraft mods on [Modrinth](https://modrinth.com) and [GitHub Releases](https://github.com/releases). Simply specify the mods you use through the CLI and in just one command, you can download all the mods and update any existing ones.
Ferium is an open source and easy to use package manager for Minecraft mods on [Modrinth](https://modrinth.com) and [GitHub Releases](https://github.com/releases). Simply specify the mods you use through the CLI and in just one command, you can download all the mods and update existing ones.

## Feature requests

If you want to have a feature added, check the [project](https://github.com/theRookieCoder/ferium/projects/1) to see if the feature is already added/planned. If not, you can [create a new issue](https://github.com/theRookieCoder/ferium/issues/new)

## Building or working on Ferium

You can build the project and install it to `~/bin` make sure you have `cargo` installed and run `make install`. If you are working on the project, you can use `make install-dev`. If you want to obtain executables for a specific OS, you can run `make build-<OS>` and replace `<OS>` with `mac`, `win`, or `linux`
First you have to install the Rust toolchain (`cargo`, `rustup`, etc).
To build the project and install it to `~/bin`, run `make install`. If you want to test the project, you can use `make install-dev` which compiles with `--debug`. If you want to obtain executables for a specific OS, you can run `make build-<OS>` and replace `<OS>` with `mac`, `win`, or `linux`. The produced binaries will be zipped and moved to `out/`
21 changes: 17 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
build-mac:
cargo clean
# For macOS on Intel
rm -f out/ferium-macos-x64.zip out/ferium-macos-arm.zip
mkdir -p out

cargo build --target=x86_64-apple-darwin --release
# For macOS on Apple Silicon
cargo build --target=aarch64-apple-darwin --release

zip -r out/ferium-macos-x64.zip -j target/x86_64-apple-darwin/release/ferium
zip -r out/ferium-macos-arm.zip -j target/aarch64-apple-darwin/release/ferium

build-win:
cargo clean
# For Windows x64
rm -f out/ferium-windows-gnu.zip
mkdir -p out

cargo build --target=x86_64-pc-windows-gnu --release

zip -r out/ferium-windows-gnu.zip -j target/x86_64-pc-windows-gnu/release/ferium

build-linux:
cargo clean
# For Linux x86-64
rm -f out/ferium-linux-gnu.zip
mkdir -p out

cargo build --target=x86_64-unknown-linux-gnu --release

mkdir out
zip -r out/ferium-linux-gnu.zip -j target/x86_64-unknown-linux-gnu/release/ferium

install:
cargo install --force --path . --root ~

Expand Down

0 comments on commit b9104b7

Please sign in to comment.