File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed
Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 1+ TARGET ?= aarch64-apple-darwin
2+
13.PHONY : default test
24
35default : release
46
57build :
68 make -C ./src/file-explorer-ui dist
7- make -C ./src/http-server build
9+ make -C ./src/http-server build TARGET= $( TARGET )
810
911release :
1012 make -C ./src/file-explorer-ui release
11- make -C ./src/http-server release
13+ make -C ./src/http-server release TARGET= $( TARGET )
1214
1315run :
1416 make -C ./src/http-server run
Original file line number Diff line number Diff line change @@ -28,6 +28,21 @@ Build release binaries with:
2828make release
2929```
3030
31+ Optionally you can build for other targets by specifying the ` TARGET ` variable
32+
33+ ``` bash
34+ make release TARGET=< target-triple>
35+ ```
36+
37+ For example:
38+
39+ ``` bash
40+ # Install aarch64-unknown-linux-gnu target
41+ rustup target install aarch64-unknown-linux-gnu
42+ # Build for aarch64-unknown-linux-gnu target
43+ make release TARGET=aarch64-unknown-linux-gnu
44+ ```
45+
3146Then use the following _ alias_ for convenience
3247
3348``` bash
Original file line number Diff line number Diff line change 1+ TARGET ?= aarch64-apple-darwin
2+
13.PHONY : default
24
35default :
46 cargo r -- start
57
68build :
7- cargo b
9+ @echo " Building for target: $( TARGET) "
10+ cargo b --target $(TARGET )
811
912release :
10- cargo b --release
13+ @echo " Building with release mode for target: $( TARGET) "
14+ cargo b --release --target $(TARGET )
1115
1216dist :
1317 make -C ../file-explorer-ui dist
You can’t perform that action at this time.
0 commit comments