2019-07-02 09:50:24 +00:00
|
|
|
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
|
|
|
|
|
2019-07-06 07:30:00 +00:00
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
CARGO_FLAGS=
|
|
|
|
BUILD_DIR=target/debug
|
|
|
|
else
|
|
|
|
CARGO_FLAGS=--release
|
|
|
|
BUILD_DIR=target/release
|
|
|
|
endif
|
2016-12-25 11:35:34 +00:00
|
|
|
|
2019-07-06 07:30:00 +00:00
|
|
|
all: build
|
2019-07-02 09:50:24 +00:00
|
|
|
|
2019-07-06 07:30:00 +00:00
|
|
|
build:
|
|
|
|
cargo build --all $(CARGO_FLAGS)
|
2019-07-02 09:50:24 +00:00
|
|
|
|
2019-07-06 07:30:00 +00:00
|
|
|
install: build
|
|
|
|
install -d $(DESTDIR)$(PLUGINS_DIR)
|
|
|
|
install -m 755 $(BUILD_DIR)/*.$(SO_SUFFIX) $(DESTDIR)$(PLUGINS_DIR)
|
2019-07-02 09:50:24 +00:00
|
|
|
|
2016-12-25 11:35:34 +00:00
|
|
|
clean:
|
|
|
|
cargo clean
|
|
|
|
|