Skip to content

Commit d9e3bc8

Browse files
committed
add Makefile to engine and template for easy access to useful commands
1 parent 0d83ea4 commit d9e3bc8

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
run:
2+
./scripts/run.sh
3+
4+
new-project:
5+
./scripts/create-project.sh $(filter-out $@,$(MAKECMDGOALS))

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Lazuli is an engine for 3d graphics.
33

44
# How-to
55
## Create a new project
6-
To create a new project using this engine, run [run script](./scripts/create-project.sh) with the project name as the second argument.
7-
For example,
6+
To create a new project using this engine, run `make new-project` from the root directory with the project name as the second argument.
7+
For example:
88
```bash
9-
./scripts/create-project.sh My-awesome-project
9+
make new-project My-awesome-project
1010
```
1111

1212
The project will be created in the same parent directory that this repository resides in.
@@ -18,7 +18,7 @@ For example:
1818

1919
# Contributing
2020
## Running a test scene
21-
To start the engine locally, run [run.sh](/scripts/run.sh). The scene that will be used is defined in [the entrypoint file](./src/bin.rs).
21+
To start the engine locally, run `make run` from the root directory. The scene that will be used is defined in [the entrypoint file](./src/bin.rs).
2222

2323
## Coding standards
2424
### Shaders

project-template/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
run:
2+
./scripts/run.sh

project-template/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
This project uses [Lazuli](https://github.com/lucdrenth/lazuli) as a graphics engine.
33

44
# Running
5-
To run the project as intended, use [run.sh](./scripts/run.sh).
6-
Alternatively, run `cargo run` in a terminal.
5+
To run the project, run `make run` from the root directory.

scripts/create-project.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ cp -r ${LAZULI_DIRECTORY}/project-template/src ./
7878
printf "README.md\n"
7979
cp ${LAZULI_DIRECTORY}/project-template/README.md ./
8080

81+
printf "Makefile\n"
82+
cp ${LAZULI_DIRECTORY}/project-template/Makefile ./
83+
8184
# Getting here means we successfully created the project
8285
log_info "Successfully created project '${NEW_PROJECT_NAME}'"
8386

0 commit comments

Comments
 (0)