From e5cbe99ad631e50a0cc3d445b469b507c9206cc7 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 1 Mar 2020 03:32:36 +0100 Subject: [PATCH] Update Makefile --- Makefile | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 79c8b966..b64c72c7 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,3 @@ -FFMPEG = transcoder/ffmpeg -CONFIG = $(FFMPEG)/config.h -OPTIONS = --pkg-config-flags=--static \ - --disable-shared \ - --enable-static \ - --disable-asm \ - --disable-zlib \ - --disable-iconv \ - --disable-ffplay \ - --disable-ffprobe \ - --disable-ffmpeg - -TRANSCODERDIR = transcoder/build - NEEDED = dotnet \ cmake \ gcc \ @@ -24,29 +10,13 @@ RED = \033[1;31m NOCOL = \033[0m -all: dependencies transcoder +all: dependencies dependencies: @for pkg in $(NEEDED); do \ $$pkg --version >> /dev/null 2>&1 || ($(ECHO) "$(RED)ERROR: $$pkg could not be found.$(NOCOL)"; exit 1); \ done -$(CONFIG): - $(ECHO) "$(COL)Configuring FFMPEG$(NOCOL)" - cd $(FFMPEG) && ./configure $(OPTIONS) - -ffmpeg: $(CONFIG) - $(ECHO) "$(COL)Building FFMPEG$(NOCOL)" - $(MAKE) -C $(FFMPEG) - -transcoder: ffmpeg - $(ECHO) "$(COL)Building the transcoder$(NOCOL)" - mkdir --parent $(TRANSCODERDIR) - cd $(TRANSCODERDIR) && cmake .. && make - mv $(TRANSCODERDIR)/libtranscoder.so Kyoo/ - $(ECHO) "$(COL)Transcoder built$(NOCOL)" - - install_kyoo: all $(ECHO) "$(COL)Building the app$(NOCOL)" @if ! [[ $$(mkdir --parent /opt/kyoo) -eq 0 && -w /opt/kyoo ]]; then echo -e "$(RED)You don't have permissions to install Kyoo. Try to re run with sudo privileges.$(NOCOL)"; exit 1; fi @@ -61,4 +31,4 @@ install: install_kyoo chown -R kyoo /opt/kyoo chgrp -R kyoo /opt/kyoo -.PHONY = all dependencies ffmpeg transcoder +.PHONY = all dependencies transcoder