Merge pull request #50 from hbokh/feature/apple-silicon-build

Update Makefile to build on Apple Silicon
This commit is contained in:
Denis Pauk 2024-06-19 19:49:14 +03:00 committed by GitHub
commit 28566d3fcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
else ifeq ($(YQ2_OSTYPE),Windows)
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
# ----------
@ -222,6 +225,8 @@ else ifeq ($(YQ2_OSTYPE),OpenBSD)
LDFLAGS ?= -L/usr/local/lib
else ifeq ($(YQ2_OSTYPE),Windows)
LDFLAGS ?= -L/usr/lib
else ifeq ($(YQ2_OSTYPE),Darwin)
LDFLAGS ?= -L/usr/local/lib -L/opt/homebrew/lib
endif
# Link address sanitizer if requested.

View File

@ -2,21 +2,22 @@
This is the vkQuake2 vulkan renderer library ported to Yamagi Quake II.
## Compilation
You'll need:
* clang or gcc,
* GNU Make,
* SDL2 with `sdl2-config`,
* vulkan-headers,
* 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,
the library can be found under *release/ref_vk.dll* (Windows) or
*release/ref_vk.so* (unixoid systems).
## Usage
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)
of currently tested devices for the reference.
Note: Game saves outputs to `Documents\YamagiQ2\stdout.txt` under
windows.
Note: Game saves outputs to `Documents\YamagiQ2\stdout.txt` under 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
@ -118,7 +121,7 @@ windows.
* **vk_underwater**: Warp the scene if underwater. Set to `0` to disable
the effect. Defaults to `1`.
## Console Variables (MacOS)
## Console Variables (macOS)
* **vk_molten_metalbuffers**: enable/disable Metal buffers to bind textures
more efficiently (>= Big Sur). (default: `0`)