mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-22 10:06:29 +00:00
91adc3c416
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.
34 lines
573 B
Makefile
34 lines
573 B
Makefile
PLUGINS_DIR ?= $(shell pkg-config --variable=pluginsdir gstreamer-1.0)
|
|
|
|
OS=$(shell uname -s)
|
|
ifeq ($(OS),Linux)
|
|
SO_SUFFIX=so
|
|
else
|
|
ifeq ($(OS),Darwin)
|
|
SO_SUFFIX=dylib
|
|
else
|
|
# FIXME: Bad hack, how to know we're on Windows?
|
|
SO_SUFFIX=dll
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(DEBUG),1)
|
|
CARGO_FLAGS=
|
|
BUILD_DIR=target/debug
|
|
else
|
|
CARGO_FLAGS=--release
|
|
BUILD_DIR=target/release
|
|
endif
|
|
|
|
all: build
|
|
|
|
build:
|
|
cargo build --all $(CARGO_FLAGS)
|
|
|
|
install: build
|
|
install -d $(DESTDIR)$(PLUGINS_DIR)
|
|
install -m 755 $(BUILD_DIR)/*.$(SO_SUFFIX) $(DESTDIR)$(PLUGINS_DIR)
|
|
|
|
clean:
|
|
cargo clean
|
|
|