[vlc-devel] [PATCH 2/4] Add rust targets and cargo to contrib makefile

Kartik Ohri kartikohri13 at gmail.com
Wed Jul 22 12:40:50 CEST 2020


I was able to use the $(ARCH) in the makefile to avoid a different shell
file :).

On Wed, Jul 22, 2020 at 4:07 PM rustyc <kartikohri13 at gmail.com> wrote:

> From: Kartik Ohri <kartikohri13 at gmail.com>
>
> ---
>  contrib/src/main.mak | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 3119a39875..633e168e59 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -440,6 +440,25 @@ else
>  MESON = meson $(MESONFLAGS)
>  endif
>
> +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
> +
> +CARGO = cargo cinstall --target=$(RUST_TARGET) --prefix=$(PREFIX) \
> +    --library-type staticlib --release
> +
>  ifdef GPL
>  REQUIRE_GPL =
>  else
> --
> 2.25.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200722/2133e974/attachment.html>


More information about the vlc-devel mailing list