浏览代码

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.
RDR8 7 年之前
父节点
当前提交
4c4b564392
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/Makefile

+ 3 - 1
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
 # (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.
 # 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
 # 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.
 # Hint: add -L$(RAYLIB_INSTALL_PATH) -I$(RAYLIB_H_INSTALL_PATH) to your own makefiles.
 # See below and ../examples/Makefile for more information.
 # See below and ../examples/Makefile for more information.
 
 
@@ -568,6 +568,8 @@ ifeq ($(ROOT),root)
     ifeq ($(PLATFORM_OS),LINUX)
     ifeq ($(PLATFORM_OS),LINUX)
         ifeq ($(RAYLIB_LIBTYPE),SHARED)
         ifeq ($(RAYLIB_LIBTYPE),SHARED)
 		rm --force --interactive --verbose $(RAYLIB_INSTALL_PATH)/libraylib.so*
 		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.
 		# Uncomment to clean up the runtime linker cache. See install target.
 		ldconfig
 		ldconfig
         else
         else