Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2019-07-06 10:30:00 +0300
committerSebastian Dröge <sebastian@centricular.com>2019-07-06 10:32:22 +0300
commit91adc3c416eca943c565d573f19ac83ce7289322 (patch)
treec6592dbb6df2779be8cc7fea0053c59bbeae87b1 /Makefile
parentce1ed81922b81079359aafed5072e552a09d5922 (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 13 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index fe44cf8ef..8c06c535c 100644
--- a/Makefile
+++ b/Makefile
@@ -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