[vlc-devel] [PATCH 1/8] contrib: add rust targets and cargo to contrib makefile

Thomas Guillem thomas at gllm.fr
Tue Aug 25 16:45:02 CEST 2020


From: Kartik Ohri <kartikohri13 at gmail.com>

---
 contrib/src/main-rust.mak | 20 ++++++++++++++++++++
 contrib/src/main.mak      |  5 +++++
 2 files changed, 25 insertions(+)
 create mode 100644 contrib/src/main-rust.mak

diff --git a/contrib/src/main-rust.mak b/contrib/src/main-rust.mak
new file mode 100644
index 00000000000..ca272e25e21
--- /dev/null
+++ b/contrib/src/main-rust.mak
@@ -0,0 +1,20 @@
+# 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
+RUST_TARGET = $(ARCH)-pc-windows-gnu
+else ifdef HAVE_BSD
+RUST_TARGET = $(HOST)
+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
+RUST_TARGET = $(ARCH)-unknown-linux-gnu
+endif
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 7c25e8b27c0..0266e2a1199 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
 #
-- 
2.28.0



More information about the vlc-devel mailing list