Skip to content

Commit

Permalink
chore(Makefile): add BUILD_TYPE to build debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Apr 2, 2024
1 parent d572256 commit 3f5dc2e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ALL_ROOTFS := $(shell find rootfs -type f)
PREFIX ?= /usr
CACHE_DIR := .cache

# Build variables
BUILD_TYPE ?= release

# Docker image variables
IMAGE_NAME ?= inputplumber-builder
IMAGE_TAG ?= latest
Expand Down Expand Up @@ -37,7 +40,7 @@ help: ## Display this help.

.PHONY: install
install: build ## Install inputplumber to the given prefix (default: PREFIX=/usr)
install -D -m 755 target/release/$(NAME) \
install -D -m 755 target/$(BUILD_TYPE)/$(NAME) \
$(PREFIX)/bin/$(NAME)
install -D -m 644 rootfs/usr/share/dbus-1/system.d/$(DBUS_NAME).conf \
$(PREFIX)/share/dbus-1/system.d/$(DBUS_NAME).conf
Expand Down Expand Up @@ -71,13 +74,16 @@ uninstall: ## Uninstall inputplumber

##@ Development

.PHONY: build ## Build (Default: BUILD_TYPE=release)
build: target/$(BUILD_TYPE)/$(NAME)

.PHONY: debug
debug: target/debug/$(NAME) ## Build debug build
target/debug/$(NAME): $(ALL_RS) Cargo.lock
cargo build

.PHONY: build
build: target/release/$(NAME) ## Build release build
.PHONY: release
release: target/release/$(NAME) ## Build release build
target/release/$(NAME): $(ALL_RS) Cargo.lock
cargo build --release

Expand Down

0 comments on commit 3f5dc2e

Please sign in to comment.