mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-24 20:41:00 +00:00
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.
This commit is contained in:
parent
ce1ed81922
commit
91adc3c416
1 changed files with 13 additions and 10 deletions
23
Makefile
23
Makefile
|
@ -12,19 +12,22 @@ else
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: debug
|
ifeq ($(DEBUG),1)
|
||||||
|
CARGO_FLAGS=
|
||||||
|
BUILD_DIR=target/debug
|
||||||
|
else
|
||||||
|
CARGO_FLAGS=--release
|
||||||
|
BUILD_DIR=target/release
|
||||||
|
endif
|
||||||
|
|
||||||
debug:
|
all: build
|
||||||
cargo build --all
|
|
||||||
|
|
||||||
release:
|
build:
|
||||||
cargo build --all --release
|
cargo build --all $(CARGO_FLAGS)
|
||||||
|
|
||||||
install: debug
|
install: build
|
||||||
install target/debug/*.$(SO_SUFFIX) $(PLUGINS_DIR)
|
install -d $(DESTDIR)$(PLUGINS_DIR)
|
||||||
|
install -m 755 $(BUILD_DIR)/*.$(SO_SUFFIX) $(DESTDIR)$(PLUGINS_DIR)
|
||||||
install-release: release
|
|
||||||
install target/release/*.$(SO_SUFFIX) $(PLUGINS_DIR)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cargo clean
|
cargo clean
|
||||||
|
|
Loading…
Reference in a new issue