add makefile

This commit is contained in:
Ricardo (XenGi) Band 2023-05-25 00:03:17 +02:00
commit 38fb391fd3
No known key found for this signature in database
2 changed files with 26 additions and 2 deletions

20
Makefile Normal file
View file

@ -0,0 +1,20 @@
.PHONY: main keys_en-us-intl keys_de help
.DEFAULT_GOAL := help
main: ## generate main case
# TODO: split into printable pieces
openscad --export-format binstl -o main.stl main.scad
openscad -o main.3mf main.scad
keys_en-us-intl: ## generate key caps with english us interational layout
openscad --export-format binstl -o keys_en-us-intl.stl keys_en-us-intl.scad
openscad -o keys_en-us-intl.3mf keys_en-us-intl.scad
keys_de: ## generate key caps with german layout
openscad --export-format binstl -o keys_de.stl keys_de.scad
openscad -o keys_de.3mf keys_de.scad
help: ## display this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

View file

@ -11,14 +11,18 @@ Follow the guide at https://mkbd65.xengi.de to build a case for your phone.
_TBA_
```shell
make main
```
## Generate a key set
To generate the key set you can either use a predefined layout or generate your own. There are two predefined layouts
for English US International and German. You can generate the 3D files for them with the following commands:
```shell
make keys:en-us-intl
make keys:de
make keys_en-us-intl
make keys_de
```
This will generate the neccessary 3MF and STL files that you can use for your 3D printers slicer software. I recommend a