Skip to content

Commit

Permalink
Made installation directory portable across Linux distros
Browse files Browse the repository at this point in the history
  • Loading branch information
nurupo committed Jun 25, 2017
1 parent 5aef093 commit f21c501
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
14 changes: 1 addition & 13 deletions vlc-2.1.x/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
PREFIX = /usr
LD = ld
CC = cc
INSTALL = install
Expand All @@ -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
Expand Down
14 changes: 1 addition & 13 deletions vlc-2.2.x+/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
PREFIX = /usr
LD = ld
CC = cc
INSTALL = install
Expand All @@ -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
Expand Down

0 comments on commit f21c501

Please sign in to comment.