Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 398b98f

Browse files
authored
Added a usage target to makefile (#1069)
* Added a usage target to makefile * Fixed typo
1 parent 4ba3de3 commit 398b98f

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

Makefile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build check clean clippy compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra \
1+
.PHONY: usage build check clean clippy compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra \
22
compile-cairo-2-casm compile-cairo-2-sierra coverage deps test heaptrack check-python-version
33

44
export PATH:=$(shell pyenv root)/shims:$(PATH)
@@ -10,7 +10,6 @@ ifeq ($(OS), Darwin)
1010
export LDFLAGS += -L/opt/homebrew/opt/gmp/lib
1111
endif
1212

13-
1413
CAIRO_SOURCES=$(wildcard cairo_programs/*.cairo)
1514
CAIRO_TARGETS=$(patsubst %.cairo,%.json,$(CAIRO_SOURCES))
1615
CAIRO_ABI_TARGETS=$(patsubst %.cairo,%_abi.json,$(CAIRO_SOURCES))
@@ -28,6 +27,24 @@ STARKNET_SIERRA_COMPILE_CAIRO_1:=cairo1/bin/starknet-sierra-compile
2827
STARKNET_COMPILE_CAIRO_2:=cairo2/bin/starknet-compile
2928
STARKNET_SIERRA_COMPILE_CAIRO_2:=cairo2/bin/starknet-sierra-compile
3029

30+
usage:
31+
@echo 'Usage:'
32+
@echo ' build: Builds the Rust code'
33+
@echo ' check: Runs cargo check'
34+
@echo ' deps: Installs dependencies'
35+
@echo ' deps-macos: Installs depedencies for MacOS'
36+
@echo ' clean: Cleans all build artifacts'
37+
@echo ' clippy: Runs clippy'
38+
@echo ' test: Runs all tests'
39+
@echo ' test-cairo-1: Runs the Cairo 1 tests'
40+
@echo ' test-cairo-2: Runs the Cairo 2 tests'
41+
@echo ' test-doctests: Runs the doctests'
42+
@echo ' coverage: Runs everything necessary to generate the coverage report'
43+
@echo ' coverage-report: Just generates the coverage report'
44+
@echo ' heaptrack: Runs the heaptrack script'
45+
@echo ' flamegraph: Runs cargo flamegraph'
46+
@echo ' benchmark: Runs the benchmarks scripts'
47+
3148
#
3249
# VENV rules.
3350
#
@@ -106,7 +123,6 @@ $(CAIRO_2_CONTRACTS_TEST_DIR)/%.casm: $(CAIRO_2_CONTRACTS_TEST_DIR)/%.sierra
106123
compile-cairo-2-sierra: $(CAIRO_2_COMPILED_SIERRA_CONTRACTS)
107124
compile-cairo-2-casm: $(CAIRO_2_COMPILED_CASM_CONTRACTS)
108125

109-
110126
CAIRO_2_VERSION=2.2.0
111127

112128
cairo-repo-2-dir = cairo2
@@ -133,7 +149,6 @@ cairo-%-macos.tar:
133149
cairo-%.tar:
134150
curl -L -o "$@" "https://github.com/starkware-libs/cairo/releases/download/v$*/release-x86_64-unknown-linux-musl.tar.gz"
135151

136-
137152
# =================
138153
# Normal rules.
139154
# =================

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ It makes use of [cairo-vm](https://github.com/lambdaclass/cairo-vm), the Rust im
5656

5757
### Installation
5858

59+
If you run `make` on it's own it will print out the main targets and their description.
60+
5961
Run the following make targets to have a working environment (if in Mac or if you encounter an error, see the subsection below):
6062

6163
#### Linux (x86-64)

0 commit comments

Comments
 (0)