Avoid realpath, no available on macOS 12.x

This commit is contained in:
Lior Halphon
2024-03-09 13:37:50 +02:00
parent 17c962e500
commit efc93d0422
2 changed files with 3 additions and 6 deletions

View File

@@ -636,7 +636,7 @@ $(BIN)/BootROMs/%.bin: BootROMs/%.asm $(OBJ)/BootROMs/SameBoyLogo.pb12
# Libretro Core (uses its own build system)
libretro:
CFLAGS="$(WARNINGS)" $(MAKE) -C libretro BOOTROMS_DIR=$(BOOTROMS_DIR) BIN=$(BIN)
CFLAGS="$(WARNINGS)" $(MAKE) -C libretro BOOTROMS_DIR=$(abspath $(BOOTROMS_DIR)) BIN=$(abspath $(BIN))
# install for Linux/FreeDesktop/etc.
# Does not install mimetype icons because FreeDesktop is cursed abomination with no right to exist.

View File

@@ -328,11 +328,10 @@ endif
ifeq ($(STATIC_LINKING), 1)
# For some reason libretro's buildbot expects the output to be at ./libretro/ for static targets
BIN ?= $(realpath -m $(CORE_DIR)/libretro)
BIN ?= $(abspath $(CORE_DIR)/libretro)
else
BIN ?= $(realpath -m $(CORE_DIR))
BIN ?= $(abspath $(CORE_DIR))
endif
override BIN := $(shell cd .. && realpath -m $(BIN))
TARGET := $(BIN)/$(TARGET)
@@ -373,8 +372,6 @@ CFLAGS += -D__LIBRETRO__ $(fpic) $(INCFLAGS) -std=gnu11 -D_GNU_SOURCE -D_USE_M
all: $(TARGET)
override BOOTROMS_DIR := $(shell cd .. && realpath -m $(BOOTROMS_DIR))
$(CORE_DIR)/libretro/%_boot.c: $(BOOTROMS_DIR)/%_boot.bin
echo "/* AUTO-GENERATED */" > $@
echo "const unsigned char $(notdir $(@:%.c=%))[] = {" >> $@