diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x64/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x64/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x64/Makefile	2017-11-07 16:16:01.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x64/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -1,13 +1,15 @@
 #################################
 # VideoMasterHD
 #################################
-
+DESTDIR ?= /
+libdir ?= /usr/lib
 default:
 	
 install:
-	cp libvideomasterhd.so.1.0.1 /usr/lib
-	/sbin/ldconfig
-	ln -sf /usr/lib/libvideomasterhd.so.1 /usr/lib/libvideomasterhd.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd.so.1.0.1 $(DESTDIR)$(libdir)
+	ln -sf libvideomasterhd.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd.so.1
+	ln -sf libvideomasterhd.so.1 $(DESTDIR)$(libdir)/libvideomasterhd.so 
 
 	
 	
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x86/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x86/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x86/Makefile	2017-11-07 16:16:02.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD/x86/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -5,18 +5,13 @@
 #################################
 # Setup common variables
 #################################
-
-LBITS := $(shell getconf LONG_BIT)
-ifeq ($(LBITS),64)
-TARGET_DIR := lib32
-else
-TARGET_DIR := lib
-endif
+DESTDIR ?= /
+libdir ?= /usr/lib
 
 default:
 	
 install:
-
-	cp libvideomasterhd.so.1.0.1 /usr/$(TARGET_DIR)/libvideomasterhd.so.1.0.1
-	/sbin/ldconfig
-	ln -sf /usr/$(TARGET_DIR)/libvideomasterhd.so.1 /usr/$(TARGET_DIR)/libvideomasterhd.so
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd.so.1.0.1
+	ln -sf libvideomasterhd.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd.so.1
+	ln -sf libvideomasterhd.so.1 $(DESTDIR)$(libdir)/libvideomasterhd.so
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x64/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x64/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x64/Makefile	2017-11-07 16:16:02.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x64/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -1,11 +1,13 @@
 #################################
 # VideoMasterHD_Audio
 #################################
-
+DESTDIR ?= /
+libdir ?= /usr/lib
 default:
 
 install:
-	cp libvideomasterhd_audio.so.1.0.1 /usr/lib
-	/sbin/ldconfig
-	ln -sf /usr/lib/libvideomasterhd_audio.so.1 /usr/lib/libvideomasterhd_audio.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd_audio.so.1.0.1 $(DESTDIR)$(libdir)
+	ln -sf libvideomasterhd_audio.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_audio.so.1
+	ln -sf libvideomasterhd_audio.so.1 $(DESTDIR)$(libdir)/libvideomasterhd_audio.so 
 
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x86/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x86/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x86/Makefile	2017-11-07 16:16:02.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Audio/x86/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -5,18 +5,13 @@
 #################################
 # Setup common variables
 #################################
-
-LBITS := $(shell getconf LONG_BIT)
-ifeq ($(LBITS),64)
-TARGET_DIR := lib32
-else
-TARGET_DIR := lib
-endif
+DESTDIR ?= /
+libdir ?= /usr/lib
 
 default:
 
 install:
-
-	cp libvideomasterhd_audio.so.1.0.1 /usr/$(TARGET_DIR)/libvideomasterhd_audio.so.1.0.1
-	/sbin/ldconfig
-	ln -sf /usr/$(TARGET_DIR)/libvideomasterhd_audio.so.1 /usr/$(TARGET_DIR)/libvideomasterhd_audio.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd_audio.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_audio.so.1.0.1
+	ln -sf libvideomasterhd_audio.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_audio.so.1
+	ln -sf libvideomasterhd_audio.so.1 $(DESTDIR)$(libdir)/libvideomasterhd_audio.so
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x64/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x64/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x64/Makefile	2017-11-07 16:16:03.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x64/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -1,12 +1,15 @@
 #################################
 # VideoMasterHD_Vbi
 #################################
+DESTDIR ?= /
+libdir ?= /usr/lib
 
 default:
 
 install:
-	cp libvideomasterhd_vbi.so.1.0.1 /usr/lib
-	/sbin/ldconfig
-	ln -sf /usr/lib/libvideomasterhd_vbi.so.1 /usr/lib/libvideomasterhd_vbi.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd_vbi.so.1.0.1 $(DESTDIR)$(libdir)
+	ln -sf libvideomasterhd_vbi.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbi.so.1
+	ln -sf libvideomasterhd_vbi.so.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbi.so
 
 	
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x86/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x86/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x86/Makefile	2017-11-07 16:16:03.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_Vbi/x86/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -5,19 +5,14 @@
 #################################
 # Setup common variables
 #################################
-
-LBITS := $(shell getconf LONG_BIT)
-ifeq ($(LBITS),64)
-TARGET_DIR := lib32
-else
-TARGET_DIR := lib
-endif
+DESTDIR ?= /
+libdir ?= /usr/lib
 
 default:
 
 install:
-
-	cp libvideomasterhd_vbi.so.1.0.1 /usr/$(TARGET_DIR)/libvideomasterhd_vbi.so.1.0.1
-	/sbin/ldconfig
-	ln -sf /usr/$(TARGET_DIR)/libvideomasterhd_vbi.so.1 /usr/$(TARGET_DIR)/libvideomasterhd_vbi.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd_vbi.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbi.so.1.0.1
+	ln -sf libvideomasterhd_vbi.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbi.so.1
+	ln -sf libvideomasterhd_vbi.so.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbi.so
 	
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x64/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x64/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x64/Makefile	2017-11-07 16:16:03.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x64/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -1,12 +1,14 @@
 #################################
 # VideoMasterHD_Vbi
 #################################
-
+DESTDIR ?= /
+libdir ?= /usr/lib
 default:
 
 install:
-	cp libvideomasterhd_vbidata.so.1.0.1 /usr/lib
-	/sbin/ldconfig
-	ln -sf /usr/lib/libvideomasterhd_vbidata.so.1 /usr/lib/libvideomasterhd_vbidata.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd_vbidata.so.1.0.1 $(DESTDIR)$(libdir)
+	ln -sf libvideomasterhd_vbidata.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbidata.so.1
+	ln -sf libvideomasterhd_vbidata.so.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbidata.so
 
 	
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x86/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x86/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x86/Makefile	2017-11-07 16:16:03.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_VbiData/x86/Makefile	2017-11-07 21:44:03.177267037 +0100
@@ -5,19 +5,14 @@
 #################################
 # Setup common variables
 #################################
-
-LBITS := $(shell getconf LONG_BIT)
-ifeq ($(LBITS),64)
-TARGET_DIR := lib32
-else
-TARGET_DIR := lib
-endif
+DESTDIR ?= /
+libdir ?= /usr/lib
 
 default:
 
 install:
-
-	cp libvideomasterhd_vbidata.so.1.0.1 /usr/$(TARGET_DIR)/libvideomasterhd_vbidata.so.1.0.1
-	/sbin/ldconfig
-	ln -sf /usr/$(TARGET_DIR)/libvideomasterhd_vbidata.so.1 /usr/$(TARGET_DIR)/libvideomasterhd_vbidata.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd_vbidata.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbidata.so.1.0.1
+	ln -sf libvideomasterhd_vbidata.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbidata.so.1
+	ln -sf libvideomasterhd_vbidata.so.1 $(DESTDIR)$(libdir)/libvideomasterhd_vbidata.so
 	
diff -rupN a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_SP/x64/Makefile b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_SP/x64/Makefile
--- a/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_SP/x64/Makefile	2017-11-07 16:16:02.000000000 +0100
+++ b/VideoMasterHD_SDK_Linux_v6.04/Library/VideoMasterHD_SP/x64/Makefile	2017-11-07 23:00:37.685207012 +0100
@@ -2,15 +2,19 @@
 # VideoMasterHD_SP
 #################################
 
+DESTDIR ?= /
+libdir ?= /usr/lib
 default:
 
 install:
-	cp libvideomasterhd_sp.so.1.0.1 /usr/lib
-	cp libFlxComm64.so.2016.03 /usr/lib
-	cp libFlxCore64.so.2016.03 /usr/lib
-	/sbin/ldconfig
-	ln -sf /usr/lib/libvideomasterhd_sp.so.1 /usr/lib/libvideomasterhd_sp.so 
-	ln -sf /usr/lib/libFlxComm64.so.2016.03 /usr/lib/libFlxComm64.so 
-	ln -sf /usr/lib/libFlxCore64.so.2016.03 /usr/lib/libFlxCore64.so 
+	mkdir -p $(DESTDIR)$(libdir)
+	cp libvideomasterhd_sp.so.1.0.1 $(DESTDIR)$(libdir)
+	cp libFlxComm64.so.2016.03 $(DESTDIR)$(libdir)
+	cp libFlxCore64.so.2016.03 $(DESTDIR)$(libdir)
+	#/sbin/ldconfig
+	ln -sf ./libvideomasterhd_sp.so.1 $(DESTDIR)$(libdir)/libvideomasterhd_sp.so 
+	ln -sf ./libvideomasterhd_sp.so.1.0.1 $(DESTDIR)$(libdir)/libvideomasterhd_sp.so.1 
+	ln -sf ./libFlxComm64.so.2016.03 $(DESTDIR)$(libdir)/libFlxComm64.so 
+	ln -sf ./libFlxCore64.so.2016.03 $(DESTDIR)$(libdir)/libFlxCore64.so 
 
 	
