Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Makefile.libretro
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ else ifeq ($(platform), wiiu)

# Nintendo Switch (libtransistor)
else ifeq ($(platform), switch)
EXT=a
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
STATIC_LINKING=1
EXT=so
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
LDFLAGS = $(LD_SHARED_LIBRARY_FLAGS) -ltransistor.lib.nro $(LIBTRANSISTOR_LIB_LDFLAGS) -E
EXTERNAL_ZLIB=1


Expand Down Expand Up @@ -602,6 +602,10 @@ ifeq ($(STATIC_LINKING),1)
else
LD = link.exe
endif
else ifeq ($(platform), switch)
OBJOUT = -o
LINKOUT = -o
# libtransistor.mk sets LD for us
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better way to do this that doesn't involve special-casing?

else
OBJOUT = -o
LINKOUT = -o
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we replaced LD = $(CC) with LD ?= $(CC), would it break building other platforms?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the SNES Classic/Mini guys were asking to replace all of our compiler/linker = with ?=, as well, so it's probably something we should investigate.

Expand Down