Commit 91adc3c4 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Clean up Makefile some more

Use $(DESTDIR) as prefix for the installation to make distros' lifes
easier and have a simple "all" / "build" / "install" rule. By default we
do a release build, if DEBUG=1 is specified we do a debug build.
parent ce1ed819
Pipeline #46996 passed with stages
in 16 minutes and 31 seconds
......@@ -12,19 +12,22 @@ else
endif
endif
all: debug
debug:
cargo build --all
ifeq ($(DEBUG),1)
CARGO_FLAGS=
BUILD_DIR=target/debug
else
CARGO_FLAGS=--release
BUILD_DIR=target/release
endif
release:
cargo build --all --release
all: build
install: debug
install target/debug/*.$(SO_SUFFIX) $(PLUGINS_DIR)
build:
cargo build --all $(CARGO_FLAGS)
install-release: release
install target/release/*.$(SO_SUFFIX) $(PLUGINS_DIR)
install: build
install -d $(DESTDIR)$(PLUGINS_DIR)
install -m 755 $(BUILD_DIR)/*.$(SO_SUFFIX) $(DESTDIR)$(PLUGINS_DIR)
clean:
cargo clean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment