Skip to content

Commit

Permalink
[libretro] Fix build with C sources
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Jan 11, 2024
1 parent fec4cd7 commit 7e88ff9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 31 deletions.
7 changes: 5 additions & 2 deletions platforms/libretro/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,13 @@ ifeq ($(STATIC_LINKING), 1)
else
$(CXX) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) $(LDFLAGS)
endif
%.o: %.c

%.o: %.cpp
$(CXX) $(CXXFLAGS) $(fpic) -c -o $@ $<

%.o: %.c
$(CC) $(CXXFLAGS) $(fpic) -c -o $@ $<

clean:
rm -f $(OBJECTS) $(TARGET)

Expand Down
58 changes: 29 additions & 29 deletions platforms/libretro/Makefile.common
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
SOURCES_C :=
SOURCES_CXX := $(CORE_DIR)/libretro.cpp \
$(SOURCE_DIR)/GearsystemCore.cpp \
$(SOURCE_DIR)/Memory.cpp \
$(SOURCE_DIR)/Processor.cpp \
$(SOURCE_DIR)/Video.cpp \
$(SOURCE_DIR)/Audio.cpp \
$(SOURCE_DIR)/Input.cpp \
$(SOURCE_DIR)/Cartridge.cpp \
$(SOURCE_DIR)/MemoryRule.cpp \
$(SOURCE_DIR)/CodemastersMemoryRule.cpp \
$(SOURCE_DIR)/GameGearIOPorts.cpp \
$(SOURCE_DIR)/RomOnlyMemoryRule.cpp \
$(SOURCE_DIR)/SegaMemoryRule.cpp \
$(SOURCE_DIR)/KoreanMemoryRule.cpp \
$(SOURCE_DIR)/MSXMemoryRule.cpp \
$(SOURCE_DIR)/SG1000MemoryRule.cpp \
$(SOURCE_DIR)/JanggunMemoryRule.cpp \
$(SOURCE_DIR)/BootromMemoryRule.cpp \
$(SOURCE_DIR)/SmsIOPorts.cpp \
$(SOURCE_DIR)/YM2413.cpp \
$(SOURCE_DIR)/opcodes.cpp \
$(SOURCE_DIR)/opcodes_cb.cpp \
$(SOURCE_DIR)/opcodes_ed.cpp \
$(SOURCE_DIR)/audio/Blip_Buffer.cpp \
$(SOURCE_DIR)/audio/Effects_Buffer.cpp \
$(SOURCE_DIR)/audio/Sms_Apu.cpp \
$(SOURCE_DIR)/audio/Multi_Buffer.cpp
$(SOURCE_DIR)/audio/emu2413/emu2413.cpp \
SOURCES_C := $(SOURCE_DIR)/audio/emu2413/emu2413.c

SOURCES_CXX := $(CORE_DIR)/libretro.cpp \
$(SOURCE_DIR)/GearsystemCore.cpp \
$(SOURCE_DIR)/Memory.cpp \
$(SOURCE_DIR)/Processor.cpp \
$(SOURCE_DIR)/Video.cpp \
$(SOURCE_DIR)/Audio.cpp \
$(SOURCE_DIR)/Input.cpp \
$(SOURCE_DIR)/Cartridge.cpp \
$(SOURCE_DIR)/MemoryRule.cpp \
$(SOURCE_DIR)/CodemastersMemoryRule.cpp \
$(SOURCE_DIR)/GameGearIOPorts.cpp \
$(SOURCE_DIR)/RomOnlyMemoryRule.cpp \
$(SOURCE_DIR)/SegaMemoryRule.cpp \
$(SOURCE_DIR)/KoreanMemoryRule.cpp \
$(SOURCE_DIR)/MSXMemoryRule.cpp \
$(SOURCE_DIR)/SG1000MemoryRule.cpp \
$(SOURCE_DIR)/JanggunMemoryRule.cpp \
$(SOURCE_DIR)/BootromMemoryRule.cpp \
$(SOURCE_DIR)/SmsIOPorts.cpp \
$(SOURCE_DIR)/YM2413.cpp \
$(SOURCE_DIR)/opcodes.cpp \
$(SOURCE_DIR)/opcodes_cb.cpp \
$(SOURCE_DIR)/opcodes_ed.cpp \
$(SOURCE_DIR)/audio/Blip_Buffer.cpp \
$(SOURCE_DIR)/audio/Effects_Buffer.cpp \
$(SOURCE_DIR)/audio/Sms_Apu.cpp \
$(SOURCE_DIR)/audio/Multi_Buffer.cpp

0 comments on commit 7e88ff9

Please sign in to comment.