<commit_before># Building Mirus
Mirus uses `rake` to build the kernel, drivers, userspace, and other components.

## Getting Source
Source code for Mirus is hosted on [GitHub](https://github.com/joshbeitler/mirus).  It can be cloned via

```
git clone https://github.com/joshbeitler/mirus.git --recursive
cd mirus
git submodue init
rake
```

See the `CONTRIBUTING.md` file if you wish to submit any changes you make to the Mirus project.

## Build Targets
The following targets are avalible via `rake <target-name>`:
* `build_all` - Build all components
* `build_asm` - Build only assembly code components
* `build_kernel` - Build only the kernel
* `clean` - Clean up all binaries, object files, etc.
* `link` - Only perform the link stage
* `make_iso` - Create an ISO image
* `qemu` - Run in Qemu

Note that many of these targets depend on each other.  As such, if you call, say, `make_iso`, it will also call `build_asm`, `build_kernel`, and `link`.

You can find the source for the targets in the `build/lib` directory, and in the `Rakefile`.<commit_msg>Updated BUILDING.md with configuration instructions<commit_after># Building Mirus
Mirus uses `rake` to build the kernel, drivers, userspace, and other components.

## Getting Source
Source code for Mirus is hosted on [GitHub](https://github.com/joshbeitler/mirus).  It can be cloned via

```
git clone https://github.com/joshbeitler/mirus.git --recursive
cd mirus
git submodue init
rake
```

See the `CONTRIBUTING.md` file if you wish to submit any changes you make to the Mirus project.

## Build Targets
The following targets are avalible via `rake <target-name>`:
* `build_all` - Build all components
* `build_asm` - Build only assembly code components
* `build_kernel` - Build only the kernel
* `clean` - Clean up all binaries, object files, etc.
* `link` - Only perform the link stage
* `make_iso` - Create an ISO image
* `qemu` - Run in Qemu

Note that many of these targets depend on each other.  As such, if you call, say, `make_iso`, it will also call `build_asm`, `build_kernel`, and `link`.

You can find the source for the targets in the `build/lib` directory, and in `Rakefile`.

## Build Configuration
In order to configure the build to specific needs, you will need to create a file called `config.rb` in the `build` directory.  An example build configuration file is located in the `docs` directory.
{'fraction_non_alphanumeric': 0.09317032040472176, 'fraction_numerical': 0.0, 'mean_word_length': 4.296875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '44018', 'n_tokens_mistral': 711, 'n_tokens_neox': 692, 'n_words': 329}