Fix for CentOS / RedHat
sudo make install fix for CentOS / RedHat
###############################################################################
################################### COMMANDS ##################################
###############################################################################
+# Check RedHat || CentOS
+$(eval PLATFORM_RH=$(shell (lsb_release -ds 2>/dev/null || cat /etc/*release 2>/dev/null | head -n1 || uname -om) | egrep '(Red Hat|CentOS)'))
+
+# Log Platform RedHat || CentOS
+$(if $(PLATFORM_RH), $(info Platform is $(PLATFORM_RH)))
+
+# For RedHat || CentOS we need rh-python36
+ifneq ("$(PLATFORM_RH)","")
+ PIP_INSTALL_REQUIREMENTS := source scl_source enable rh-python36 && pip3 install -Ir
+ PYTHON_BUILD_PACKAGE = source scl_source enable rh-python36 && python3 setup.py build -b ../$(PYTHON_BUILD_DIR)
+ CMAKE := source scl_source enable rh-python36 && cmake
+else
+ PIP_INSTALL_REQUIREMENTS := pip3 install -Ir
+ PYTHON_BUILD_PACKAGE = python3 setup.py build -b ../$(PYTHON_BUILD_DIR)
+ CMAKE := cmake
+endif
+
MKDIR_PATH := mkdir -p
CD := cd
LN := ln -sf
-CMAKE := cmake
PIP_USER_FLAG = --user
-PIP_INSTALL_REQUIREMENTS := pip3 install -Ir
USE_PIP_CACHE := no
-PYTHON_BUILD_PACKAGE = python3 setup.py build -b ../$(PYTHON_BUILD_DIR)
+
RM_DIR := rm -r
RM_FILE := rm
MAKE_INSTALL = $(MAKE) install
