45 lines
1.2 KiB
Makefile
45 lines
1.2 KiB
Makefile
# Old target:
|
|
# armv7-unknown-linux-gnueabihf
|
|
# New target:
|
|
# arm-unknown-linux-musleabihf
|
|
# armv7-unknown-linux-musleabihf
|
|
|
|
# TARGET = arm-unknown-linux-gnueabihf
|
|
# TARGET = armv7-unknown-linux-gnueabihf
|
|
# TARGET = arm-unknown-linux-gnueabi
|
|
# TARGET = armv7-unknown-linux-gnueabi
|
|
|
|
TARGET = arm-unknown-linux-musleabihf
|
|
# TARGET = armv7-unknown-linux-musleabihf
|
|
# TARGET = arm-unknown-linux-musleabi
|
|
# TARGET = armv7-unknown-linux-musleabi
|
|
|
|
HOST = 192.168.85.104
|
|
# HOST = 192.168.1.82
|
|
# HOST = raspberrypi
|
|
|
|
PROJECT_NAME = aw-lights
|
|
|
|
.PHONY: build release
|
|
|
|
deploy-release: build-release
|
|
scp ./target/$(TARGET)/release/$(PROJECT_NAME) pi@$(HOST):$(PROJECT_NAME)-bin
|
|
|
|
build-release:
|
|
cargo build --release --target=$(TARGET)
|
|
du -sh ./target/$(TARGET)/release/$(PROJECT_NAME) ||:
|
|
arm-linux-musleabihf-strip ./target/$(TARGET)/release/$(PROJECT_NAME)
|
|
du -sh ./target/$(TARGET)/release/$(PROJECT_NAME) ||:
|
|
|
|
deploy: build
|
|
scp ./target/$(TARGET)/debug/$(PROJECT_NAME) pi@$(HOST):$(PROJECT_NAME)-bin
|
|
|
|
build:
|
|
cargo build --target=$(TARGET)
|
|
du -sh ./target/$(TARGET)/debug/$(PROJECT_NAME) ||:
|
|
arm-linux-musleabihf-strip ./target/$(TARGET)/debug/$(PROJECT_NAME)
|
|
du -sh ./target/$(TARGET)/release/$(PROJECT_NAME) ||:
|
|
|
|
run: deploy
|
|
ssh pi@192.168.1.82 ./$(PROJECT_NAME)-bin
|