[vlc-commits] contrib: add rust targets to contrib makefile

Kartik Ohri git at videolan.org
Thu Sep 10 12:43:17 CEST 2020


vlc | branch: master | Kartik Ohri <kartikohri13 at gmail.com> | Tue Aug 25 14:36:35 2020 +0200| [764d26be71fcdced2e703cf80db88efa1f9ed704] | committer: Thomas Guillem

contrib: add rust targets to contrib makefile

Co-Authored-By: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=764d26be71fcdced2e703cf80db88efa1f9ed704
---

 contrib/src/main-rust.mak | 28 ++++++++++++++++++++++++++++
 contrib/src/main.mak      |  5 +++++
 2 files changed, 33 insertions(+)

diff --git a/contrib/src/main-rust.mak b/contrib/src/main-rust.mak
new file mode 100644
index 0000000000..cc8f86e863
--- /dev/null
+++ b/contrib/src/main-rust.mak
@@ -0,0 +1,28 @@
+# Cargo/Rust specific makefile rules for VLC 3rd party libraries ("contrib")
+# Copyright (C) 2003-2020 the VideoLAN team
+#
+# This file is under the same license as the vlc package.
+
+ifdef HAVE_WIN32
+ifeq ($(HOST),i686-w64-mingw32)
+RUST_TARGET = i686-pc-windows-gnu # ARCH is i386
+else
+RUST_TARGET = $(ARCH)-pc-windows-gnu
+endif
+else ifdef HAVE_ANDROID
+RUST_TARGET = $(HOST)
+else ifdef HAVE_IOS
+RUST_TARGET = $(ARCH)-apple-ios
+else ifdef HAVE_MACOSX
+RUST_TARGET = $(ARCH)-apple-darwin
+else ifdef HAVE_SOLARIS
+RUST_TARGET = x86_64-sun-solaris
+else ifdef HAVE_LINUX
+ifeq ($(HOST),arm-linux-gnueabihf)
+RUST_TARGET = arm-unknown-linux-gnueabihf #add eabihf
+else
+RUST_TARGET = $(ARCH)-unknown-linux-gnu
+endif
+else ifdef HAVE_BSD
+RUST_TARGET = $(HOST)
+endif
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 7c25e8b27c..0266e2a119 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -450,6 +450,11 @@ REQUIRE_GNUV3 = \
 	exit 1
 endif
 
+#
+# Rust specific rules
+#
+include $(SRC)/main-rust.mak
+
 #
 # Per-package build rules
 #



More information about the vlc-commits mailing list