get aarch64-none-elf to configure & build

This commit is contained in:
Dave Murphy 2018-03-10 11:05:56 +00:00
parent 4cd981609b
commit 9a27289760
13 changed files with 153 additions and 0 deletions

66
configure vendored
View File

@ -25619,6 +25619,72 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
have_timers=yes
fi
;;
aarch64-none-elf*)
ARCH=switch
EXTRA_CFLAGS="$EXTRA_CFLAGS -isystem${DEVKITPRO}/libnx/include -I${DEVKITPRO}/portlibs/switch/include -D__SWITCH__=1"
CheckDeclarationAfterStatement
CheckDiskAudio
CheckDummyAudio
# Set up files for the video library
if test x$enable_video = xyes; then
$as_echo "#define SDL_VIDEO_DRIVER_SWITCH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/video/switch/*.c"
SUMMARY_video="${SUMMARY_video} switch"
have_video=yes
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_SWITCH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/audio/switch/*.c"
SUMMARY_audio="${SUMMARY_audio} switch"
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
$as_echo "#define SDL_JOYSTICK_SWITCH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/joystick/switch/*.c"
have_joystick=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_SWITCH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/switch/*.c"
have_timers=yes
fi
# Set up files for the system power library
if test x$enable_power = xyes; then
$as_echo "#define SDL_POWER_SWITCH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/power/switch/*.c"
have_power=yes
fi
# Set up files for the system filesystem library
if test x$enable_filesystem = xyes; then
$as_echo "#define SDL_FILESYSTEM_SWITCH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/filesystem/switch/*.c"
have_filesystem=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
$as_echo "#define SDL_THREAD_SWITCH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/thread/switch/*.c"
have_threads=yes
fi
;;
*)
as_fn_error $? "
*** Unsupported host: Please add to configure.ac

View File

@ -4230,6 +4230,58 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
have_timers=yes
fi
;;
aarch64-none-elf*)
ARCH=switch
EXTRA_CFLAGS="$EXTRA_CFLAGS -isystem${DEVKITPRO}/libnx/include -I${DEVKITPRO}/portlibs/switch/include -D__SWITCH__=1"
CheckDeclarationAfterStatement
CheckDiskAudio
CheckDummyAudio
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_SWITCH, 1, [ ])
SOURCES="$SOURCES $srcdir/src/video/switch/*.c"
SUMMARY_video="${SUMMARY_video} switch"
have_video=yes
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_SWITCH, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/switch/*.c"
SUMMARY_audio="${SUMMARY_audio} switch"
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_SWITCH, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/switch/*.c"
have_joystick=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_SWITCH, 1, [ ])
SOURCES="$SOURCES $srcdir/src/timer/switch/*.c"
have_timers=yes
fi
# Set up files for the system power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_SWITCH, 1, [ ])
SOURCES="$SOURCES $srcdir/src/power/switch/*.c"
have_power=yes
fi
# Set up files for the system filesystem library
if test x$enable_filesystem = xyes; then
AC_DEFINE(SDL_FILESYSTEM_SWITCH, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/switch/*.c"
have_filesystem=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
AC_DEFINE(SDL_THREAD_SWITCH, 1, [ ])
SOURCES="$SOURCES $srcdir/src/thread/switch/*.c"
have_threads=yes
fi
;;
*)
AC_MSG_ERROR([
*** Unsupported host: Please add to configure.ac

View File

@ -287,6 +287,7 @@
#undef SDL_AUDIO_DRIVER_SUNAUDIO
#undef SDL_AUDIO_DRIVER_WASAPI
#undef SDL_AUDIO_DRIVER_WINMM
#undef SDL_AUDIO_DRIVER_SWITCH
/* Enable various input drivers */
#undef SDL_INPUT_LINUXEV
@ -307,6 +308,7 @@
#undef SDL_JOYSTICK_RAWINPUT
#undef SDL_JOYSTICK_EMSCRIPTEN
#undef SDL_JOYSTICK_VIRTUAL
#undef SDL_JOYSTICK_SWITCH
#undef SDL_HAPTIC_DUMMY
#undef SDL_HAPTIC_ANDROID
#undef SDL_HAPTIC_LINUX
@ -331,12 +333,14 @@
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
#undef SDL_THREAD_WINDOWS
#undef SDL_THREAD_SWITCH
/* Enable various timer systems */
#undef SDL_TIMER_HAIKU
#undef SDL_TIMER_DUMMY
#undef SDL_TIMER_UNIX
#undef SDL_TIMER_WINDOWS
#undef SDL_TIMER_SWITCH
/* Enable various video drivers */
#undef SDL_VIDEO_DRIVER_HAIKU
@ -382,6 +386,7 @@
#undef SDL_VIDEO_DRIVER_VIVANTE
#undef SDL_VIDEO_DRIVER_VIVANTE_VDK
#undef SDL_VIDEO_DRIVER_QNX
#undef SDL_VIDEO_DRIVER_SWITCH
#undef SDL_VIDEO_RENDER_D3D
#undef SDL_VIDEO_RENDER_D3D11
@ -417,6 +422,7 @@
#undef SDL_POWER_ANDROID
#undef SDL_POWER_EMSCRIPTEN
#undef SDL_POWER_HARDWIRED
#undef SDL_POWER_SWITCH
/* Enable system filesystem support */
#undef SDL_FILESYSTEM_HAIKU
@ -427,6 +433,7 @@
#undef SDL_FILESYSTEM_NACL
#undef SDL_FILESYSTEM_ANDROID
#undef SDL_FILESYSTEM_EMSCRIPTEN
#undef SDL_FILESYSTEM_SWITCH
/* Enable assembly routines */
#undef SDL_ASSEMBLY_ROUTINES

0
src/audio/switch/dummy.c Normal file
View File

View File

@ -57,6 +57,8 @@
#define SDL_DYNAMIC_API 0
#elif defined(__clang_analyzer__)
#define SDL_DYNAMIC_API 0 /* Turn off for static analysis, so reports are more clear. */
#elif defined(__SWITCH__) && __SWITCH__
#define SDL_DYNAMIC_API 0 /* Probably not useful on switch. */
#endif
/* everyone else. This is where we turn on the API if nothing forced it off. */

View File

View File

0
src/power/switch/dummy.c Normal file
View File

View File

@ -38,6 +38,8 @@
#include "stdcpp/SDL_systhread_c.h"
#elif SDL_THREAD_OS2
#include "os2/SDL_systhread_c.h"
#elif SDL_THREAD_SWITCH
#include "switch/SDL_systhread_c.h"
#else
#error Need thread implementation for this platform
#include "generic/SDL_systhread_c.h"

View File

@ -0,0 +1,24 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include <switch.h>
typedef Thread* SYS_ThreadHandle;

View File

0
src/timer/switch/dummy.c Normal file
View File

0
src/video/switch/dummy.c Normal file
View File