From f21c50146d766457dd79188897fb9b6c3dfe873d Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Sat, 24 Jun 2017 22:14:09 -0400 Subject: [PATCH] Made installation directory portable across Linux distros --- vlc-2.1.x/Makefile | 14 +------------- vlc-2.2.x+/Makefile | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/vlc-2.1.x/Makefile b/vlc-2.1.x/Makefile index 877afae..ceedb76 100644 --- a/vlc-2.1.x/Makefile +++ b/vlc-2.1.x/Makefile @@ -1,4 +1,3 @@ -PREFIX = /usr LD = ld CC = cc INSTALL = install @@ -7,18 +6,7 @@ LDFLAGS = VLC_PLUGIN_CFLAGS := $(shell pkg-config --cflags vlc-plugin) VLC_PLUGIN_LIBS := $(shell pkg-config --libs vlc-plugin) -libdir = $(PREFIX)/lib - -# Slackware and openSUSE use /usr/lib64 on x86_64 -ARCH=$(shell uname -m) -ifeq ($(ARCH), x86_64) - lib64Test=$(shell grep -E "Slackware|openSUSE" /etc/*-release | wc -l) - ifneq ($(lib64Test), 0) - libdir = $(PREFIX)/lib64 - endif -endif - -plugindir = $(libdir)/vlc/plugins +plugindir := $(shell pkg-config vlc-plugin --variable=pluginsdir) override CC += -std=gnu99 override CPPFLAGS += -DPIC -I. -Isrc diff --git a/vlc-2.2.x+/Makefile b/vlc-2.2.x+/Makefile index 877afae..ceedb76 100644 --- a/vlc-2.2.x+/Makefile +++ b/vlc-2.2.x+/Makefile @@ -1,4 +1,3 @@ -PREFIX = /usr LD = ld CC = cc INSTALL = install @@ -7,18 +6,7 @@ LDFLAGS = VLC_PLUGIN_CFLAGS := $(shell pkg-config --cflags vlc-plugin) VLC_PLUGIN_LIBS := $(shell pkg-config --libs vlc-plugin) -libdir = $(PREFIX)/lib - -# Slackware and openSUSE use /usr/lib64 on x86_64 -ARCH=$(shell uname -m) -ifeq ($(ARCH), x86_64) - lib64Test=$(shell grep -E "Slackware|openSUSE" /etc/*-release | wc -l) - ifneq ($(lib64Test), 0) - libdir = $(PREFIX)/lib64 - endif -endif - -plugindir = $(libdir)/vlc/plugins +plugindir := $(shell pkg-config vlc-plugin --variable=pluginsdir) override CC += -std=gnu99 override CPPFLAGS += -DPIC -I. -Isrc