From 4c4b5643925f442ff7d5bcbd8e6670b993d00b10 Mon Sep 17 00:00:00 2001 From: RDR8 Date: Sun, 11 Feb 2018 23:42:22 +0000 Subject: [PATCH] Update Makefiles for Linux installation. See prior commit. These changes are intended to provide context and control over the Linux make install process. make install RAYLIB_LIBTYPE=SHARED now works as expected. libraylib.so is properly installed with attendant runtime links. The examples will be running against the newly installed libraylib.so unless otherwise specified with RAYLIB_RUNTIME_PATH. See raylib/src/Makefile and raylib/examples/Makefile for usage of RAYLIB_INSTALL_PATH, RAYLIB_H_INSTALL_PATH, and RAYLIB_RUNTIME_PATH variables. RAYLIB_RUNTIME_PATH in particular is interesting for portability since sudo isn't needed. The default configuration and workflow is essentially unchanged and unaffected. --- src/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index b44ff462..79bdf97f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -518,7 +518,7 @@ utils.o : utils.c utils.h # (without a package manager). We'll use /usr/local/lib/raysan5 and /usr/local/include/raysan5 # for our -L and -I specification to simplify management of the raylib source package. # Customize these locations if you like but don't forget to pass them to make -# for compilation and enable runtime linking with -rpath, LD_LIBRARY_PATH, or ldconfig,. +# for compilation and enable runtime linking with -rpath, LD_LIBRARY_PATH, or ldconfig. # Hint: add -L$(RAYLIB_INSTALL_PATH) -I$(RAYLIB_H_INSTALL_PATH) to your own makefiles. # See below and ../examples/Makefile for more information. @@ -568,6 +568,8 @@ ifeq ($(ROOT),root) ifeq ($(PLATFORM_OS),LINUX) ifeq ($(RAYLIB_LIBTYPE),SHARED) rm --force --interactive --verbose $(RAYLIB_INSTALL_PATH)/libraylib.so* + rm --force --interactive --verbose $(RAYLIB_INSTALL_PATH)/libraylib.so.$(RAYLIB_API_VERSION) + rm --force --interactive --verbose $(RAYLIB_INSTALL_PATH)/libraylib.so.$(RAYLIB_VERSION) # Uncomment to clean up the runtime linker cache. See install target. ldconfig else