Commit ec8a565a authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

Fix 3ds compilation

parent 81002c59
......@@ -16,7 +16,11 @@ all: $(TARGET)
$(MAKE) $(TARGET)
$(TARGET): $(OBJECTS) | vendor/libretro-common/include/libretro.h
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
$(CXX) -o $@ $^ $(LDFLAGS)
endif
%.o: %.cpp | vendor/libretro-common/include/libretro.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
......
......@@ -49,6 +49,11 @@ ifneq ($(STATIC_LINKING), 1)
SOURCES_C += $(CORE_DIR)/vendor/libretro-common/utils/md5.c
endif
ifeq ($(platform), ctr)
SOURCES_C += $(CORE_DIR)/vendor/libretro-common/audio/audio_mix.c \
$(CORE_DIR)/vendor/libretro-common/audio/audio_mixer.c
endif
# stb_vorbis
#SOURCES_C += $(CORE_DIR)/vendor/stb/stb_vorbis.c
FLAGS += -DHAVE_STB_VORBIS
......
......@@ -190,11 +190,18 @@ else ifeq ($(platform), dos)
else ifeq ($(platform), ctr)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT)
CXX = $(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT)
AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)
AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)
PLATFORM_DEFINES := -DARM11 -D_3DS
CFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard
CFLAGS += -Wall -mword-relocations
CFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffast-math
CFLAGS += -I$(DEVKITPRO)/libctru/include
CXXFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard
CXXFLAGS += -Wall -mword-relocations
CXXFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffast-math
CXXFLAGS += -I$(DEVKITPRO)/libctru/include
STATIC_LINKING=1
EXTERNAL_ZLIB=1
......
......@@ -459,3 +459,9 @@ void retro_run(void) {
ChaiLove::environ_cb(RETRO_ENVIRONMENT_SHUTDOWN, 0);
}
}
#ifdef _3DS
extern "C" int nanosleep(const struct timespec *req, struct timespec *rem) {
return 0;
}
#endif
......@@ -52,7 +52,7 @@ bool window::load(const config& conf) {
}
// Enable video buffering.
app->videoBuffer = (unsigned int *)app->screen->pixels;
app->videoBuffer = (uint32_t *)app->screen->pixels;
// Set the title.
setTitle(conf.window.title);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment