Tweak makefile

This commit is contained in:
Brian Tarricone 2022-05-04 00:51:14 -07:00
parent 2ae04ff91a
commit 7de9a2cdb8

View File

@ -1,4 +1,4 @@
.PHONY: all build build-dev install clean uninstall run .PHONY: all release dev install clean uninstall run run-dialog
PREFIX ?= /usr/local PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin BINDIR ?= $(PREFIX)/bin
@ -17,15 +17,15 @@ INSTALL ?= install
DEV_LOG_LEVEL = debug DEV_LOG_LEVEL = debug
all: build all: release
build: release:
HELPER_DIR=$(HELPER_DIR) cargo build --release HELPER_DIR=$(HELPER_DIR) cargo build --release
build-dev: dev:
HELPER_DIR=target/debug cargo build HELPER_DIR=target/debug cargo build
install: build install: release
$(INSTALL) -m 0755 -d $(BINDIR) $(HELPER_DIR) $(CONFIG_DIR) $(INSTALL) -m 0755 -d $(BINDIR) $(HELPER_DIR) $(CONFIG_DIR)
$(INSTALL) -m 0755 target/release/bscreensaver $(BINDIR) $(INSTALL) -m 0755 target/release/bscreensaver $(BINDIR)
$(INSTALL) -m 0755 $(addprefix target/release/,$(HELPERS)) $(HELPER_DIR) $(INSTALL) -m 0755 $(addprefix target/release/,$(HELPERS)) $(HELPER_DIR)
@ -39,7 +39,7 @@ uninstall:
rmdir -p $(BINDIR) $(HELPER_DIR) || true rmdir -p $(BINDIR) $(HELPER_DIR) || true
rmdir -p $(PREFIX) || true rmdir -p $(PREFIX) || true
run: build-dev run: dev
BSCREENSAVER_LOCAL_DEV=1 \ BSCREENSAVER_LOCAL_DEV=1 \
RUST_BACKTRACE=1 \ RUST_BACKTRACE=1 \
BSCREENSAVER_LOG=$(DEV_LOG_LEVEL) \ BSCREENSAVER_LOG=$(DEV_LOG_LEVEL) \