2021-10-16 07:36:15 -04:00
|
|
|
# Old target:
|
|
|
|
# armv7-unknown-linux-gnueabihf
|
|
|
|
# New target:
|
2022-07-25 22:29:32 -04:00
|
|
|
# arm-unknown-linux-musleabihf
|
2021-10-16 07:36:15 -04:00
|
|
|
# armv7-unknown-linux-musleabihf
|
|
|
|
|
2022-11-17 15:58:34 -05:00
|
|
|
# TARGET = arm-unknown-linux-gnueabihf
|
2022-07-25 22:29:32 -04:00
|
|
|
# TARGET = armv7-unknown-linux-gnueabihf
|
|
|
|
# TARGET = arm-unknown-linux-gnueabi
|
|
|
|
# TARGET = armv7-unknown-linux-gnueabi
|
|
|
|
|
2022-11-17 15:58:34 -05:00
|
|
|
TARGET = arm-unknown-linux-musleabihf
|
2022-07-25 22:29:32 -04:00
|
|
|
# TARGET = armv7-unknown-linux-musleabihf
|
|
|
|
# TARGET = arm-unknown-linux-musleabi
|
|
|
|
# TARGET = armv7-unknown-linux-musleabi
|
|
|
|
|
2023-05-28 17:10:33 -04:00
|
|
|
HOST = 192.168.1.82
|
|
|
|
# HOST = raspberrypi
|
|
|
|
|
2021-10-16 07:36:15 -04:00
|
|
|
PROJECT_NAME = aw-lights
|
|
|
|
|
2023-02-20 16:56:56 -05:00
|
|
|
.PHONY: build release
|
2021-07-31 14:29:21 -04:00
|
|
|
|
2022-12-03 12:17:21 -05:00
|
|
|
deploy-release: build-release
|
2023-05-28 17:10:33 -04:00
|
|
|
scp ./target/$(TARGET)/release/$(PROJECT_NAME) pi@$(HOST):$(PROJECT_NAME)-bin
|
2021-10-16 07:36:15 -04:00
|
|
|
|
2022-12-03 12:17:21 -05:00
|
|
|
build-release:
|
2021-10-16 07:36:15 -04:00
|
|
|
cargo build --release --target=$(TARGET)
|
|
|
|
du -sh ./target/$(TARGET)/release/$(PROJECT_NAME) ||:
|
2023-02-20 16:08:51 -05:00
|
|
|
arm-linux-musleabihf-strip ./target/$(TARGET)/release/$(PROJECT_NAME)
|
2022-12-03 12:17:21 -05:00
|
|
|
du -sh ./target/$(TARGET)/release/$(PROJECT_NAME) ||:
|
2021-07-31 14:29:21 -04:00
|
|
|
|
|
|
|
deploy: build
|
2023-05-28 17:10:33 -04:00
|
|
|
scp ./target/$(TARGET)/debug/$(PROJECT_NAME) pi@$(HOST):$(PROJECT_NAME)-bin
|
2021-07-31 14:29:21 -04:00
|
|
|
|
2022-12-03 12:17:21 -05:00
|
|
|
build:
|
|
|
|
cargo build --target=$(TARGET)
|
|
|
|
du -sh ./target/$(TARGET)/debug/$(PROJECT_NAME) ||:
|
2023-02-20 16:08:51 -05:00
|
|
|
arm-linux-musleabihf-strip ./target/$(TARGET)/debug/$(PROJECT_NAME)
|
2022-12-03 12:17:21 -05:00
|
|
|
du -sh ./target/$(TARGET)/release/$(PROJECT_NAME) ||:
|
|
|
|
|
2021-07-31 14:29:21 -04:00
|
|
|
run: deploy
|
2023-05-28 17:10:33 -04:00
|
|
|
ssh pi@192.168.1.82 ./$(PROJECT_NAME)-bin
|