Skip to content
Open
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
16 changes: 9 additions & 7 deletions Makefile.libretro
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,10 @@ else ifeq ($(platform), msvc)

# Nintendo Switch (libtransistor)
else ifeq ($(platform), switch)
EXT=a
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
STATIC_LINKING=1
STATIC_LINKING_LINK=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

# Windows MSVC 2003 Xbox 1
else ifeq ($(platform), xbox1_msvc2003)
Expand Down Expand Up @@ -457,9 +456,11 @@ ifeq ($(STATIC_LINKING),1)
else
LD = link.exe
endif
else ifeq ($(platform), switch)
# libtransistor.mk sets LD for us
else
OBJOUT = -o
LINKOUT = -o
LINKOUT = -o
LD = $(CC)
endif

Expand All @@ -481,7 +482,8 @@ else
$(AR) rcs $@ $(OBJECTS)
endif
else
$(CC) $(fpic) $(SHARED) $(INCFLAGS) $(LDFLAGS) $(OBJOUT)$@ $(OBJECTS) $(LIBM)
echo ld $(LD)
$(LD) $(fpic) $(SHARED) $(LDFLAGS) $(OBJOUT)$@ $(OBJECTS) $(LIBM)
endif

%.o: %.c
Expand Down