Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Makefile target for building machine #172

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.cartesi
.cartesi.env
.imageid
node_modules
frontend/node_modules/**
frontend/.next/**
Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
MACHINE_IMAGE=.cartesi/image.ext2
IIDFILE=.imageid

.PHONY: all
all: bounties test-image
all: bounties $(MACHINE_IMAGE)

.PHONY: bounties
bounties:
$(MAKE) -C tests/bounties

.PHONY: machine
machine: $(MACHINE_IMAGE)

$(MACHINE_IMAGE): $(IIDFILE)
pnpm exec cartesi build --from-image "$(shell cat $<)"

$(IIDFILE): Dockerfile .dockerignore go.mod go.sum $(shell find shared contract bwrapbox skel)
docker build --iidfile $@ --platform linux/riscv64 .

.PHONY: clean
clean:
$(MAKE) -C tests/bounties clean
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pnpm i
#### From source

```sh
pnpm build
make build
```

#### From a tagged image
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.0.0",
"private": true,
"scripts": {
"build": "cartesi build",
"start": "cartesi run --disable-bundler --disable-paymaster"
},
"devDependencies": {
Expand Down
Loading