[vlc-devel] [PATCHv4 01/12] contrib: add rust targets to contrib makefile

Thomas Guillem thomas at gllm.fr
Tue Sep 8 14:13:29 CEST 2020


From: Kartik Ohri <kartikohri13 at gmail.com>

---
 contrib/src/main-rust.mak | 28 ++++++++++++++++++++++++++++
 contrib/src/main.mak      |  5 +++++
 2 files changed, 33 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..cc8f86e8636
--- /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 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