Fix amiga build (#5479)

This commit is contained in:
Artur Jarosik
2022-11-16 13:01:02 +01:00
committed by GitHub
parent d912babc91
commit 8bee40dca4
5 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ jobs:
steps:
- checkout
- run: Packaging/amiga/prep.sh
- run: PKG_CONFIG_PATH=/opt/m68k-amigaos/lib/pkgconfig/:/opt/m68k-amigaos/share/pkgconfig/ cmake -S. -Bbuild -DM68K_CPU=68040 -DM68K_FPU=hard -DM68K_COMMON="-s -ffast-math -O3 -noixemul -D__BIG_ENDIAN__ -D__AMIGA__ -fpermissive" ..
- run: PKG_CONFIG_PATH=/opt/m68k-amigaos/lib/pkgconfig/:/opt/m68k-amigaos/share/pkgconfig/ cmake -S. -Bbuild -DM68K_CPU=68040 -DM68K_FPU=hard -DM68K_COMMON="-s -fbbb=- -m68040 -ffast-math -O2 -noixemul -D__BIG_ENDIAN__ -D__AMIGA__ -fpermissive" ..
- run: cd build && make -j2
- store_artifacts: {path: ./build/devilutionx, destination: devilutionx_m68k}
vita:
+1 -1
View File
@@ -20,7 +20,7 @@ add_definitions(-Dfseeko=fseek)
list(APPEND DEVILUTIONX_PLATFORM_LINK_LIBRARIES ZLIB::ZLIB)
if(NOT WARPOS)
list(APPEND DEVILUTIONX_PLATFORM_LINK_LIBRARIES -ldebug)
list(APPEND DEVILUTIONX_PLATFORM_LINK_LIBRARIES -ldebug -noixemul)
endif()
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/Packaging/amiga/devilutionx.info" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+1 -1
View File
@@ -9,7 +9,7 @@ export SYSROOT=/opt/$TARGET
export M68K_CPU=68040
export M68K_FPU=hard
export M68K_CPU_FPU="-m${M68K_CPU} -m${M68K_FPU}-float"
export M68K_COMMON="-s -ffast-math -fomit-frame-pointer"
export M68K_COMMON="-s -ffast-math -fomit-frame-pointer -fbbb=-"
export M68K_CFLAGS="${M68K_CPU_FPU} ${M68K_COMMON}"
export M68K_CXXFLAGS="${M68K_CPU_FPU} ${M68K_COMMON}"
+4
View File
@@ -88,9 +88,11 @@ const std::string &PrefPath()
prefPath = NxdkGetPrefPath();
#else
prefPath = FromSDL(SDL_GetPrefPath("diasurgical", "devilution"));
#if !defined(__amigaos__)
if (FileExistsAndIsWriteable("diablo.ini")) {
prefPath = std::string("." DIRECTORY_SEPARATOR_STR);
}
#endif
#endif
}
return *prefPath;
@@ -105,9 +107,11 @@ const std::string &ConfigPath()
configPath = NxdkGetPrefPath();
#else
configPath = FromSDL(SDL_GetPrefPath("diasurgical", "devilution"));
#if !defined(__amigaos__)
if (FileExistsAndIsWriteable("diablo.ini")) {
configPath = std::string("." DIRECTORY_SEPARATOR_STR);
}
#endif
#endif
}
return *configPath;
+8 -4
View File
@@ -696,7 +696,7 @@ char *SDL_GetPrefPath(const char *org, const char *app)
#else
namespace {
#if !defined(__QNXNTO__)
#if !defined(__QNXNTO__) && !defined(__amigaos__)
char *readSymLink(const char *path)
{
// From sdl2-2.0.9/src/filesystem/unix/SDL_sysfilesystem.c
@@ -778,8 +778,9 @@ char *SDL_GetBasePath()
#endif
#if defined(__3DS__)
retval = SDL_strdup("file:sdmc:/3ds/devilutionx/");
return retval;
#endif
#elif defined(__amigaos__)
retval = SDL_strdup("PROGDIR:");
#else
/* is a Linux-style /proc filesystem available? */
if (!retval && (access("/proc", F_OK) == 0)) {
@@ -826,7 +827,7 @@ char *SDL_GetBasePath()
if (ptr != NULL)
retval = ptr; /* oh well if it failed. */
}
#endif
return retval;
}
@@ -849,6 +850,9 @@ char *SDL_GetPrefPath(const char *org, const char *app)
#if defined(__3DS__)
retval = SDL_strdup("sdmc:/3ds/devilutionx/");
return retval;
#elif defined(__amigaos__)
retval = SDL_strdup("PROGDIR:");
return retval;
#endif
if (!app) {