Skip to content

Commit

Permalink
Avoid realpath, no available on macOS 12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Mar 9, 2024
1 parent 17c962e commit efc93d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 2 additions & 5 deletions libretro/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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=%))[] = {" >> $@
Expand Down

0 comments on commit efc93d0

Please sign in to comment.