Updated Makefile explanation to reflect raylib 4.2.3 changes

This commit is contained in:
Jonathan Moallem 2022-07-06 21:25:39 +10:00 committed by GitHub
parent 254969d834
commit feb10e3dd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ include: submodules
... ...
``` ```
`submodules` is a very simple target that will update the git submodules in the project recursively, pulling in the current raylib-cpp repository under the `/vendor` directory and then raylib itself under its own `/vendor` directory. The reason for this, is to make sure that the pulled versions of raylib and the bindings match in version. You can [read more about git submodules here](https://git-scm.com/book/en/v2/Git-Tools-Submodules). `submodules` is a very simple target that will update the git submodules in the project recursively, pulling in the current raylib and raylib-cpp repositories. You can [read more about git submodules here](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
```Makefile ```Makefile
submodules: submodules:
git submodule update --init --recursive git submodule update --init --recursive
@ -125,8 +125,8 @@ Next, the target proceeds to call another custom function, `COPY` (a platform ag
```Makefile ```Makefile
include: submodules include: submodules
$(MKDIR) $(call platformpth, ./include) $(MKDIR) $(call platformpth, ./include)
$(call COPY,vendor/raylib-cpp/vendor/raylib/src,./include,raylib.h) $(call COPY,vendor/raylib/src,./include,raylib.h)
$(call COPY,vendor/raylib-cpp/vendor/raylib/src,./include,raymath.h) $(call COPY,vendor/raylib/src,./include,raymath.h)
$(call COPY,vendor/raylib-cpp/include,./include,*.hpp) $(call COPY,vendor/raylib-cpp/include,./include,*.hpp)
``` ```
@ -139,9 +139,9 @@ Moving on to the body of the target, we move into raylib's `/src` directory and
To complete the target, it then copies that library file into the relevant directory for your platform under `/lib`. To complete the target, it then copies that library file into the relevant directory for your platform under `/lib`.
```Makefile ```Makefile
lib: submodules lib: submodules
cd vendor/raylib-cpp/vendor/raylib/src $(THEN) "$(MAKE)" PLATFORM=PLATFORM_DESKTOP cd vendor/raylib/src $(THEN) "$(MAKE)" PLATFORM=PLATFORM_DESKTOP
$(MKDIR) $(call platformpth, lib/$(platform)) $(MKDIR) $(call platformpth, lib/$(platform))
$(call COPY,vendor/raylib-cpp/vendor/raylib/$(libGenDir),lib/$(platform),libraylib.a) $(call COPY,vendor/raylib/$(libGenDir),lib/$(platform),libraylib.a)
``` ```
Once all of these targets have been fulfilled, `setup` ends and your project should now contain a copy of the relevant static library for your platform in `/lib`, and all the necessary header files under `/include`. Once all of these targets have been fulfilled, `setup` ends and your project should now contain a copy of the relevant static library for your platform in `/lib`, and all the necessary header files under `/include`.