gst-plugins-rs/Makefile
Sebastian Dröge 91adc3c416 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.
2019-07-06 10:32:22 +03:00

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