From d6a28ead848320a4597bfaa9f6d169221b88c479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Jul 2019 12:50:24 +0300 Subject: Update Makefile with a release target, and an install and install-release target --- Makefile | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 602a88dd..fe44cf8e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,31 @@ -all: +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 + +all: debug + +debug: cargo build --all +release: + cargo build --all --release + +install: debug + install target/debug/*.$(SO_SUFFIX) $(PLUGINS_DIR) + +install-release: release + install target/release/*.$(SO_SUFFIX) $(PLUGINS_DIR) + clean: cargo clean -- cgit v1.2.3