aw-lights/Makefile
2022-11-17 15:58:34 -05:00

41 lines
1.1 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
PROJECT_NAME = aw-lights
.PHONY: build release deploy run
release:
cargo build --target=$(TARGET) --release
du -sh ./target/$(TARGET)/debug/$(PROJECT_NAME) ||:
arm-linux-gnueabihf-strip ./target/$(TARGET)/debug/$(PROJECT_NAME)
du -sh ./target/$(TARGET)/debug/$(PROJECT_NAME) ||:
build:
cargo build --target=$(TARGET)
du -sh ./target/$(TARGET)/debug/$(PROJECT_NAME) ||:
release:
cargo build --release --target=$(TARGET)
du -sh ./target/$(TARGET)/release/$(PROJECT_NAME) ||:
deploy: build
arm-linux-gnueabihf-strip ./target/$(TARGET)/debug/$(PROJECT_NAME)
scp ./target/$(TARGET)/debug/$(PROJECT_NAME) pi:$(PROJECT_NAME)-bin
run: deploy
ssh pi ./$(PROJECT_NAME)-bin