Update Makefile to build on Apple Silicon

- Added additional info to README.md
- Some markdownlinting / nitpicking on README.md
This commit is contained in:
Henk 2024-06-19 11:24:59 +02:00
parent 61be37b183
commit 9bdfc4c643
No known key found for this signature in database
GPG Key ID: 0A060AD10B455639
2 changed files with 13 additions and 5 deletions

View File

@ -207,6 +207,9 @@ else ifeq ($(YQ2_OSTYPE),OpenBSD)
INCLUDE ?= -I/usr/local/include INCLUDE ?= -I/usr/local/include
else ifeq ($(YQ2_OSTYPE),Windows) else ifeq ($(YQ2_OSTYPE),Windows)
INCLUDE ?= -I/usr/include INCLUDE ?= -I/usr/include
else ifeq ($(YQ2_OSTYPE),Darwin)
MOLTENVK_PATH ?= $(shell brew --prefix molten-vk)
INCLUDE ?= -I$(MOLTENVK_PATH)/libexec/include -I$(MOLTENVK_PATH)/include
endif endif
# ---------- # ----------
@ -222,6 +225,8 @@ else ifeq ($(YQ2_OSTYPE),OpenBSD)
LDFLAGS ?= -L/usr/local/lib LDFLAGS ?= -L/usr/local/lib
else ifeq ($(YQ2_OSTYPE),Windows) else ifeq ($(YQ2_OSTYPE),Windows)
LDFLAGS ?= -L/usr/lib LDFLAGS ?= -L/usr/lib
else ifeq ($(YQ2_OSTYPE),Darwin)
LDFLAGS ?= -L/usr/local/lib -L/opt/homebrew/lib
endif endif
# Link address sanitizer if requested. # Link address sanitizer if requested.

View File

@ -2,21 +2,22 @@
This is the vkQuake2 vulkan renderer library ported to Yamagi Quake II. This is the vkQuake2 vulkan renderer library ported to Yamagi Quake II.
## Compilation ## Compilation
You'll need: You'll need:
* clang or gcc, * clang or gcc,
* GNU Make, * GNU Make,
* SDL2 with `sdl2-config`, * SDL2 with `sdl2-config`,
* vulkan-headers, * vulkan-headers,
* vulkan-validationlayers if you like to debug issues. * vulkan-validationlayers if you like to debug issues.
For vulkan-headers on macOS with Homebrew: `brew install molten-vk`.
Type `make` to compile the library. If the compilation is successfull, Type `make` to compile the library. If the compilation is successfull,
the library can be found under *release/ref_vk.dll* (Windows) or the library can be found under *release/ref_vk.dll* (Windows) or
*release/ref_vk.so* (unixoid systems). *release/ref_vk.so* (unixoid systems).
## Usage ## Usage
Copy the library next to your Yamagi Quake II executable. You can select Copy the library next to your Yamagi Quake II executable. You can select
@ -27,9 +28,11 @@ If you have run into issues, please attach output logs with OS/driver version
and device name to the bug report. [List](https://openbenchmarking.org/test/pts/yquake2) and device name to the bug report. [List](https://openbenchmarking.org/test/pts/yquake2)
of currently tested devices for the reference. of currently tested devices for the reference.
Note: Game saves outputs to `Documents\YamagiQ2\stdout.txt` under Note: Game saves outputs to `Documents\YamagiQ2\stdout.txt` under Windows.
windows.
On macOS it is necessary to set `DYLD_LIBRARY_PATH` to load the Vulkan Portability library:
`export DYLD_LIBRARY_PATH=/opt/homebrew/opt/molten-vk/lib`
## Console Variables ## Console Variables
@ -118,7 +121,7 @@ windows.
* **vk_underwater**: Warp the scene if underwater. Set to `0` to disable * **vk_underwater**: Warp the scene if underwater. Set to `0` to disable
the effect. Defaults to `1`. the effect. Defaults to `1`.
## Console Variables (MacOS) ## Console Variables (macOS)
* **vk_molten_metalbuffers**: enable/disable Metal buffers to bind textures * **vk_molten_metalbuffers**: enable/disable Metal buffers to bind textures
more efficiently (>= Big Sur). (default: `0`) more efficiently (>= Big Sur). (default: `0`)