From 8854628fd144be1d3a03e7463d45cff52cac0331 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Sat, 26 Nov 2022 11:32:15 -0500
Subject: [PATCH] test: Removed build files from SDL2 Classic.
This just uses the toplevel CMake file now.
Reference Issue #1.
---
test/CMakeLists.txt | 443 ----
test/Makefile.in | 453 ----
test/Makefile.os2 | 18 -
test/Makefile.w32 | 21 -
test/acinclude.m4 | 337 ---
test/autogen.sh | 9 -
test/configure | 6106 -------------------------------------------
test/configure.ac | 289 --
test/watcom.mif | 122 -
9 files changed, 7798 deletions(-)
delete mode 100644 test/CMakeLists.txt
delete mode 100644 test/Makefile.in
delete mode 100644 test/Makefile.os2
delete mode 100644 test/Makefile.w32
delete mode 100644 test/acinclude.m4
delete mode 100755 test/autogen.sh
delete mode 100755 test/configure
delete mode 100644 test/configure.ac
delete mode 100644 test/watcom.mif
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
deleted file mode 100644
index 676a8e7..0000000
--- a/test/CMakeLists.txt
+++ /dev/null
@@ -1,443 +0,0 @@
-cmake_minimum_required(VERSION 3.0)
-project(SDL2_test)
-
-include(CheckCCompilerFlag)
-include(CMakeParseArguments)
-include(CMakePushCheckState)
-
-set(SDL_TEST_EXECUTABLES)
-set(SDL_TESTS_NONINTERACTIVE)
-set(SDL_TESTS_NEEDS_ESOURCES)
-
-macro(add_sdl_test_executable TARGET)
- cmake_parse_arguments(AST "NONINTERACTIVE;NEEDS_RESOURCES" "" "" ${ARGN})
- add_executable(${TARGET} ${AST_UNPARSED_ARGUMENTS})
-
- list(APPEND SDL_TEST_EXECUTABLES ${TARGET})
- if(AST_NONINTERACTIVE)
- list(APPEND SDL_TESTS_NONINTERACTIVE ${TARGET})
- endif()
- if(AST_NEEDS_RESOURCES)
- list(APPEND SDL_TESTS_NEEDS_ESOURCES ${TARGET})
- endif()
-endmacro()
-
-if(NOT TARGET SDL2::SDL2-static)
- find_package(SDL2 2.0.23 REQUIRED COMPONENTS SDL2-static SDL2test)
-endif()
-
-enable_testing()
-
-if(SDL_INSTALL_TESTS)
- include(GNUInstallDirs)
-endif()
-
-if(N3DS)
- link_libraries(SDL2::SDL2main)
-endif()
-
-if(PSP)
- link_libraries(
- SDL2::SDL2main
- SDL2::SDL2test
- SDL2::SDL2-static
- GL
- pspvram
- pspvfpu
- pspdisplay
- pspgu
- pspge
- pspaudio
- pspctrl
- psphprm
- psppower
- )
-elseif(PS2)
-link_libraries(
- SDL2main
- SDL2_test
- SDL2-static
- patches
- gskit
- dmakit
- ps2_drivers
-)
-else()
- link_libraries(SDL2::SDL2test SDL2::SDL2-static)
-endif()
-
-if(WINDOWS)
- # mingw32 must come before SDL2main to link successfully
- if(MINGW OR CYGWIN)
- link_libraries(mingw32)
- endif()
-
- # CET support was added in VS 16.7
- if(MSVC_VERSION GREATER 1926 AND CMAKE_GENERATOR_PLATFORM MATCHES "Win32|x64")
- link_libraries(-CETCOMPAT)
- endif()
-
- # FIXME: Parent directory CMakeLists.txt only sets these for mingw/cygwin,
- # but we need them for VS as well.
- link_libraries(SDL2main)
- add_definitions(-Dmain=SDL_main)
-endif()
-
-# CMake incorrectly detects opengl32.lib being present on MSVC ARM64
-if(NOT MSVC OR NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
- # Prefer GLVND, if present
- set(OpenGL_GL_PREFERENCE GLVND)
- find_package(OpenGL)
-endif()
-
-if (OPENGL_FOUND)
-add_definitions(-DHAVE_OPENGL)
-endif()
-
-add_sdl_test_executable(checkkeys checkkeys.c)
-add_sdl_test_executable(checkkeysthreads checkkeysthreads.c)
-add_sdl_test_executable(loopwave NEEDS_RESOURCES loopwave.c testutils.c)
-add_sdl_test_executable(loopwavequeue NEEDS_RESOURCES loopwavequeue.c testutils.c)
-add_sdl_test_executable(testsurround testsurround.c)
-add_sdl_test_executable(testresample NEEDS_RESOURCES testresample.c)
-add_sdl_test_executable(testaudioinfo testaudioinfo.c)
-
-file(GLOB TESTAUTOMATION_SOURCE_FILES testautomation*.c)
-add_sdl_test_executable(testautomation NEEDS_RESOURCES ${TESTAUTOMATION_SOURCE_FILES})
-add_sdl_test_executable(testmultiaudio NEEDS_RESOURCES testmultiaudio.c testutils.c)
-add_sdl_test_executable(testaudiohotplug NEEDS_RESOURCES testaudiohotplug.c testutils.c)
-add_sdl_test_executable(testaudiocapture testaudiocapture.c)
-add_sdl_test_executable(testatomic NONINTERACTIVE testatomic.c)
-add_sdl_test_executable(testintersections testintersections.c)
-add_sdl_test_executable(testrelative testrelative.c)
-add_sdl_test_executable(testhittesting testhittesting.c)
-add_sdl_test_executable(testdraw2 testdraw2.c)
-add_sdl_test_executable(testdrawchessboard testdrawchessboard.c)
-add_sdl_test_executable(testdropfile testdropfile.c)
-add_sdl_test_executable(testerror NONINTERACTIVE testerror.c)
-
-if(LINUX)
- add_sdl_test_executable(testevdev NONINTERACTIVE testevdev.c)
-endif()
-
-add_sdl_test_executable(testfile testfile.c)
-add_sdl_test_executable(testgamecontroller NEEDS_RESOURCES testgamecontroller.c testutils.c)
-add_sdl_test_executable(testgeometry testgeometry.c testutils.c)
-add_sdl_test_executable(testgesture testgesture.c)
-add_sdl_test_executable(testgl2 testgl2.c)
-add_sdl_test_executable(testgles testgles.c)
-add_sdl_test_executable(testgles2 testgles2.c)
-add_sdl_test_executable(testhaptic testhaptic.c)
-add_sdl_test_executable(testhotplug testhotplug.c)
-add_sdl_test_executable(testrumble testrumble.c)
-add_sdl_test_executable(testthread NONINTERACTIVE testthread.c)
-add_sdl_test_executable(testiconv NEEDS_RESOURCES testiconv.c testutils.c)
-add_sdl_test_executable(testime NEEDS_RESOURCES testime.c testutils.c)
-add_sdl_test_executable(testjoystick testjoystick.c)
-add_sdl_test_executable(testkeys testkeys.c)
-add_sdl_test_executable(testloadso testloadso.c)
-add_sdl_test_executable(testlocale NONINTERACTIVE testlocale.c)
-add_sdl_test_executable(testlock testlock.c)
-add_sdl_test_executable(testmouse testmouse.c)
-
-if(APPLE)
- add_sdl_test_executable(testnative NEEDS_RESOURCES
- testnative.c
- testnativecocoa.m
- testnativex11.c
- testutils.c
- )
-
- cmake_push_check_state(RESET)
- check_c_compiler_flag(-Wno-error=deprecated-declarations HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
- cmake_pop_check_state()
- if(HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
- set_property(SOURCE "testnativecocoa.m" APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-error=deprecated-declarations")
- endif()
-elseif(WINDOWS)
- add_sdl_test_executable(testnative NEEDS_RESOURCES testnative.c testnativew32.c testutils.c)
-elseif(HAVE_X11)
- add_sdl_test_executable(testnative NEEDS_RESOURCES testnative.c testnativex11.c testutils.c)
- target_link_libraries(testnative X11)
-endif()
-
-add_sdl_test_executable(testoverlay2 NEEDS_RESOURCES testoverlay2.c testyuv_cvt.c testutils.c)
-add_sdl_test_executable(testplatform NONINTERACTIVE testplatform.c)
-add_sdl_test_executable(testpower NONINTERACTIVE testpower.c)
-add_sdl_test_executable(testfilesystem NONINTERACTIVE testfilesystem.c)
-add_sdl_test_executable(testrendertarget NEEDS_RESOURCES testrendertarget.c testutils.c)
-add_sdl_test_executable(testscale NEEDS_RESOURCES testscale.c testutils.c)
-add_sdl_test_executable(testsem testsem.c)
-add_sdl_test_executable(testsensor testsensor.c)
-add_sdl_test_executable(testshader NEEDS_RESOURCES testshader.c)
-add_sdl_test_executable(testshape NEEDS_RESOURCES testshape.c)
-add_sdl_test_executable(testsprite2 NEEDS_RESOURCES testsprite2.c testutils.c)
-add_sdl_test_executable(testspriteminimal NEEDS_RESOURCES testspriteminimal.c testutils.c)
-add_sdl_test_executable(teststreaming NEEDS_RESOURCES teststreaming.c testutils.c)
-add_sdl_test_executable(testtimer NONINTERACTIVE testtimer.c)
-add_sdl_test_executable(testurl testurl.c)
-add_sdl_test_executable(testver NONINTERACTIVE testver.c)
-add_sdl_test_executable(testviewport NEEDS_RESOURCES testviewport.c testutils.c)
-add_sdl_test_executable(testwm2 testwm2.c)
-add_sdl_test_executable(testyuv NEEDS_RESOURCES testyuv.c testyuv_cvt.c)
-add_sdl_test_executable(torturethread torturethread.c)
-add_sdl_test_executable(testrendercopyex NEEDS_RESOURCES testrendercopyex.c testutils.c)
-add_sdl_test_executable(testmessage testmessage.c)
-add_sdl_test_executable(testdisplayinfo testdisplayinfo.c)
-add_sdl_test_executable(testqsort NONINTERACTIVE testqsort.c)
-add_sdl_test_executable(testbounds testbounds.c)
-add_sdl_test_executable(testcustomcursor testcustomcursor.c)
-add_sdl_test_executable(controllermap NEEDS_RESOURCES controllermap.c testutils.c)
-add_sdl_test_executable(testvulkan testvulkan.c)
-add_sdl_test_executable(testoffscreen testoffscreen.c)
-
-cmake_push_check_state(RESET)
-
-check_c_compiler_flag(-Wformat-overflow HAVE_WFORMAT_OVERFLOW)
-if(HAVE_WFORMAT_OVERFLOW)
- target_compile_definitions(testautomation PRIVATE HAVE_WFORMAT_OVERFLOW)
-endif()
-
-check_c_compiler_flag(-Wformat HAVE_WFORMAT)
-if(HAVE_WFORMAT)
- target_compile_definitions(testautomation PRIVATE HAVE_WFORMAT)
-endif()
-
-check_c_compiler_flag(-Wformat-extra-args HAVE_WFORMAT_EXTRA_ARGS)
-if(HAVE_WFORMAT_EXTRA_ARGS)
- target_compile_definitions(testautomation PRIVATE HAVE_WFORMAT_EXTRA_ARGS)
-endif()
-
-cmake_pop_check_state()
-
-if(SDL_DUMMYAUDIO)
- list(APPEND SDL_TESTS_NONINTERACTIVE
- testaudioinfo
- testsurround
- )
-endif()
-
-if(SDL_DUMMYVIDEO)
- list(APPEND SDL_TESTS_NONINTERACTIVE
- testkeys
- testbounds
- testdisplayinfo
- )
-endif()
-
-if(OPENGL_FOUND)
- if(TARGET OpenGL::GL)
- target_link_libraries(testshader OpenGL::GL)
- target_link_libraries(testgl2 OpenGL::GL)
- else()
- if(EMSCRIPTEN AND OPENGL_gl_LIBRARY STREQUAL "nul")
- set(OPENGL_gl_LIBRARY GL)
- endif()
- # emscripten's FindOpenGL.cmake does not create OpenGL::GL
- target_link_libraries(testshader ${OPENGL_gl_LIBRARY})
- target_link_libraries(testgl2 ${OPENGL_gl_LIBRARY})
- endif()
-endif()
-if(EMSCRIPTEN)
- target_link_libraries(testshader -sLEGACY_GL_EMULATION)
-endif()
-
-file(GLOB RESOURCE_FILES *.bmp *.wav *.hex moose.dat utf8.txt)
-file(COPY ${RESOURCE_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-
-if(PSP)
- # Build EBOOT files if building for PSP
- set(BUILD_EBOOT
- ${SDL_TESTS_NEEDS_ESOURCES}
- testatomic
- testaudiocapture
- testaudioinfo
- testbounds
- testdisplayinfo
- testdraw2
- testdrawchessboard
- testerror
- testfile
- testfilesystem
- testgeometry
- testgl2
- testhittesting
- testiconv
- testintersections
- testjoystick
- testlock
- testmessage
- testoverlay2
- testplatform
- testpower
- testqsort
- testsem
- teststreaming
- testsurround
- testthread
- testtimer
- testver
- testviewport
- testwm2
- torturethread
- )
- foreach(APP IN LISTS BUILD_EBOOT)
- create_pbp_file(
- TARGET ${APP}
- TITLE SDL-${APP}
- ICON_PATH NULL
- BACKGROUND_PATH NULL
- PREVIEW_PATH NULL
- )
- add_custom_command(
- TARGET ${APP} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E make_directory
- $<TARGET_FILE_DIR:${ARG_TARGET}>/sdl-${APP}
- )
- add_custom_command(
- TARGET ${APP} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E rename
- $<TARGET_FILE_DIR:${ARG_TARGET}>/EBOOT.PBP
- $<TARGET_FILE_DIR:${ARG_TARGET}>/sdl-${APP}/EBOOT.PBP
- )
- if(${BUILD_PRX})
- add_custom_command(
- TARGET ${APP} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- $<TARGET_FILE_DIR:${ARG_TARGET}>/${APP}
- $<TARGET_FILE_DIR:${ARG_TARGET}>/sdl-${APP}/${APP}
- )
- add_custom_command(
- TARGET ${APP} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E rename
- $<TARGET_FILE_DIR:${ARG_TARGET}>/${APP}.prx
- $<TARGET_FILE_DIR:${ARG_TARGET}>/sdl-${APP}/${APP}.prx
- )
- endif()
- add_custom_command(
- TARGET ${APP} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E remove
- $<TARGET_FILE_DIR:${ARG_TARGET}>/PARAM.SFO
- )
- endforeach()
-endif()
-
-if(N3DS)
- set(ROMFS_DIR "${CMAKE_CURRENT_BINARY_DIR}/romfs")
- file(COPY ${RESOURCE_FILES} DESTINATION "${ROMFS_DIR}")
-
- foreach(APP IN LISTS SDL_TEST_EXECUTABLES)
- get_target_property(TARGET_BINARY_DIR ${APP} BINARY_DIR)
- set(SMDH_FILE "${TARGET_BINARY_DIR}/${APP}.smdh")
- ctr_generate_smdh("${SMDH_FILE}"
- NAME "SDL-${APP}"
- DESCRIPTION "SDL2 Test suite"
- AUTHOR "SDL2 Contributors"
- ICON "${CMAKE_CURRENT_SOURCE_DIR}/n3ds/logo48x48.png"
- )
- ctr_create_3dsx(
- ${APP}
- ROMFS "${ROMFS_DIR}"
- SMDH "${SMDH_FILE}"
- )
- endforeach()
-endif()
-
-if(RISCOS)
- set(SDL_TEST_EXECUTABLES_AIF)
- foreach(APP IN LISTS SDL_TEST_EXECUTABLES)
- target_link_options(${APP} PRIVATE -static)
- add_custom_command(
- OUTPUT ${APP},ff8
- COMMAND elf2aif ${APP} ${APP},ff8
- DEPENDS ${APP}
- )
- add_custom_target(${APP}-aif ALL DEPENDS ${APP},ff8)
- list(APPEND SDL_TEST_EXECUTABLES_AIF ${CMAKE_CURRENT_BINARY_DIR}/${APP},ff8)
- endforeach()
-endif()
-
-foreach(APP IN LISTS SDL_TESTS_NEEDS_RESOURCES)
- foreach(RESOURCE_FILE ${RESOURCE_FILES})
- if(PSP OR PS2)
- add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>/sdl-${APP})
- else()
- add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>)
- endif()
- endforeach(RESOURCE_FILE)
- if(APPLE)
- # Make sure resource files get installed into macOS/iOS .app bundles.
- target_sources(${APP} PRIVATE "${RESOURCE_FILES}")
- set_target_properties(${APP} PROPERTIES RESOURCE "${RESOURCE_FILES}")
- endif()
-endforeach()
-
-# Set Apple App ID / Bundle ID. This is needed to launch apps on some Apple
-# platforms (iOS, for example).
-if(APPLE)
- if(${CMAKE_VERSION} VERSION_LESS "3.7.0")
- # CMake's 'BUILDSYSTEM_TARGETS' property is only available in
- # CMake 3.7 and above.
- message(WARNING "Unable to set Bundle ID for Apple .app builds due to old CMake (pre 3.7).")
- else()
- get_property(TARGETS DIRECTORY ${CMAKE_CURRENT_LIST_DIR} PROPERTY BUILDSYSTEM_TARGETS)
- foreach(CURRENT_TARGET IN LISTS TARGETS)
- get_property(TARGET_TYPE TARGET ${CURRENT_TARGET} PROPERTY TYPE)
- if(TARGET_TYPE STREQUAL "EXECUTABLE")
- set_target_properties("${CURRENT_TARGET}" PROPERTIES
- MACOSX_BUNDLE_GUI_IDENTIFIER "org.libsdl.${CURRENT_TARGET}"
- MACOSX_BUNDLE_BUNDLE_VERSION "${SDL_VERSION}"
- MACOSX_BUNDLE_SHORT_VERSION_STRING "${SDL_VERSION}"
- )
- endif()
- endforeach()
- endif()
-endif()
-
-set(TESTS_ENVIRONMENT
- SDL_AUDIODRIVER=dummy
- SDL_VIDEODRIVER=dummy
-)
-
-foreach(TESTCASE ${SDL_TESTS_NONINTERACTIVE})
- add_test(
- NAME ${TESTCASE}
- COMMAND ${TESTCASE}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
- set_tests_properties(${TESTCASE}
- PROPERTIES
- ENVIRONMENT "${TESTS_ENVIRONMENT}"
- TIMEOUT 10
- )
- if(SDL_INSTALL_TESTS)
- set(exe ${TESTCASE})
- set(installedtestsdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/installed-tests/SDL2")
- configure_file(template.test.in "${exe}.test" @ONLY)
- install(
- FILES "${CMAKE_CURRENT_BINARY_DIR}/${exe}.test"
- DESTINATION ${CMAKE_INSTALL_DATADIR}/installed-tests/SDL2
- )
- endif()
-endforeach()
-
-set_tests_properties(testthread PROPERTIES TIMEOUT 40)
-set_tests_properties(testtimer PROPERTIES TIMEOUT 60)
-
-if(SDL_INSTALL_TESTS)
- if(RISCOS)
- install(
- FILES ${SDL_TEST_EXECUTABLES_AIF}
- DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2
- )
- else()
- install(
- TARGETS ${SDL_TEST_EXECUTABLES}
- DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2
- )
- endif()
- install(
- FILES ${RESOURCE_FILES}
- DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2
- )
-endif()
diff --git a/test/Makefile.in b/test/Makefile.in
deleted file mode 100644
index 93df636..0000000
--- a/test/Makefile.in
+++ /dev/null
@@ -1,453 +0,0 @@
-# Makefile to build the SDL tests
-
-srcdir = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-libexecdir = @libexecdir@
-includedir = @includedir@
-datarootdir = @datarootdir@
-datadir = @datadir@
-
-CC = @CC@
-EXE = @EXE@
-CFLAGS = @CFLAGS@ -g
-LIBS = @LIBS@
-
-TARGETS = \
- checkkeys$(EXE) \
- checkkeysthreads$(EXE) \
- controllermap$(EXE) \
- loopwave$(EXE) \
- loopwavequeue$(EXE) \
- testatomic$(EXE) \
- testaudiocapture$(EXE) \
- testaudiohotplug$(EXE) \
- testaudioinfo$(EXE) \
- testautomation$(EXE) \
- testbounds$(EXE) \
- testcustomcursor$(EXE) \
- testdisplayinfo$(EXE) \
- testdraw2$(EXE) \
- testdrawchessboard$(EXE) \
- testdropfile$(EXE) \
- testerror$(EXE) \
- testevdev$(EXE) \
- testfile$(EXE) \
- testfilesystem$(EXE) \
- testgamecontroller$(EXE) \
- testgeometry$(EXE) \
- testgesture$(EXE) \
- testhaptic$(EXE) \
- testhittesting$(EXE) \
- testhotplug$(EXE) \
- testiconv$(EXE) \
- testime$(EXE) \
- testintersections$(EXE) \
- testjoystick$(EXE) \
- testkeys$(EXE) \
- testloadso$(EXE) \
- testlocale$(EXE) \
- testlock$(EXE) \
- testmessage$(EXE) \
- testmouse$(EXE) \
- testmultiaudio$(EXE) \
- testnative$(EXE) \
- testoverlay2$(EXE) \
- testplatform$(EXE) \
- testpower$(EXE) \
- testqsort$(EXE) \
- testrelative$(EXE) \
- testrendercopyex$(EXE) \
- testrendertarget$(EXE) \
- testresample$(EXE) \
- testrumble$(EXE) \
- testscale$(EXE) \
- testsem$(EXE) \
- testsensor$(EXE) \
- testshape$(EXE) \
- testsprite2$(EXE) \
- testspriteminimal$(EXE) \
- teststreaming$(EXE) \
- testsurround$(EXE) \
- testthread$(EXE) \
- testtimer$(EXE) \
- testurl$(EXE) \
- testver$(EXE) \
- testviewport$(EXE) \
- testvulkan$(EXE) \
- testwm2$(EXE) \
- testyuv$(EXE) \
- torturethread$(EXE) \
-
-
-@OPENGL_TARGETS@ += testgl2$(EXE) testshader$(EXE)
-@OPENGLES1_TARGETS@ += testgles$(EXE)
-@OPENGLES2_TARGETS@ += testgles2$(EXE)
-
-
-all: Makefile $(TARGETS) copydatafiles generatetestmeta
-
-installedtestsdir = $(libexecdir)/installed-tests/SDL2
-installedtestsmetadir = $(datadir)/installed-tests/SDL2
-
-generatetestmeta:
- rm -f *.test
- set -e; for exe in $(noninteractive) $(needs_audio) $(needs_display); do \
- sed \
- -e 's#@installedtestsdir@#$(installedtestsdir)#g' \
- -e "s#@exe@#$$exe#g" \
- < $(srcdir)/template.test.in > $$exe.test; \
- done
-
-install: all
- install -d $(DESTDIR)$(installedtestsdir)
- install $(TARGETS) $(DESTDIR)$(installedtestsdir)
- install -m644 $(DATA) $(DESTDIR)$(installedtestsdir)
- install -d $(DESTDIR)$(installedtestsmetadir)
- install -m644 *.test $(DESTDIR)$(installedtestsmetadir)
-
-Makefile: $(srcdir)/Makefile.in
- $(SHELL) config.status $@
-
-checkkeys$(EXE): $(srcdir)/checkkeys.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-checkkeysthreads$(EXE): $(srcdir)/checkkeysthreads.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-loopwave$(EXE): $(srcdir)/loopwave.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-loopwavequeue$(EXE): $(srcdir)/loopwavequeue.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testsurround$(EXE): $(srcdir)/testsurround.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testresample$(EXE): $(srcdir)/testresample.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testautomation$(EXE): $(srcdir)/testautomation.c \
- $(srcdir)/testautomation_audio.c \
- $(srcdir)/testautomation_clipboard.c \
- $(srcdir)/testautomation_events.c \
- $(srcdir)/testautomation_guid.c \
- $(srcdir)/testautomation_hints.c \
- $(srcdir)/testautomation_joystick.c \
- $(srcdir)/testautomation_keyboard.c \
- $(srcdir)/testautomation_main.c \
- $(srcdir)/testautomation_math.c \
- $(srcdir)/testautomation_mouse.c \
- $(srcdir)/testautomation_pixels.c \
- $(srcdir)/testautomation_platform.c \
- $(srcdir)/testautomation_rect.c \
- $(srcdir)/testautomation_render.c \
- $(srcdir)/testautomation_rwops.c \
- $(srcdir)/testautomation_sdltest.c \
- $(srcdir)/testautomation_stdlib.c \
- $(srcdir)/testautomation_surface.c \
- $(srcdir)/testautomation_syswm.c \
- $(srcdir)/testautomation_timer.c \
- $(srcdir)/testautomation_video.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testaudiohotplug$(EXE): $(srcdir)/testaudiohotplug.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testaudiocapture$(EXE): $(srcdir)/testaudiocapture.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testatomic$(EXE): $(srcdir)/testatomic.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testintersections$(EXE): $(srcdir)/testintersections.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testrelative$(EXE): $(srcdir)/testrelative.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testhittesting$(EXE): $(srcdir)/testhittesting.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testdraw2$(EXE): $(srcdir)/testdraw2.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testdropfile$(EXE): $(srcdir)/testdropfile.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testerror$(EXE): $(srcdir)/testerror.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testevdev$(EXE): $(srcdir)/testevdev.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testfile$(EXE): $(srcdir)/testfile.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testgamecontroller$(EXE): $(srcdir)/testgamecontroller.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testgeometry$(EXE): $(srcdir)/testgeometry.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testgesture$(EXE): $(srcdir)/testgesture.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
-
-testgl2$(EXE): $(srcdir)/testgl2.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
-
-testgles$(EXE): $(srcdir)/testgles.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
-
-testgles2$(EXE): $(srcdir)/testgles2.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
-
-testgles2_sdf$(EXE): $(srcdir)/testgles2_sdf.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
-
-testhaptic$(EXE): $(srcdir)/testhaptic.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testhotplug$(EXE): $(srcdir)/testhotplug.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testrumble$(EXE): $(srcdir)/testrumble.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testthread$(EXE): $(srcdir)/testthread.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testiconv$(EXE): $(srcdir)/testiconv.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testime$(EXE): $(srcdir)/testime.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @SDL_TTF_LIB@
-
-testjoystick$(EXE): $(srcdir)/testjoystick.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testkeys$(EXE): $(srcdir)/testkeys.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testloadso$(EXE): $(srcdir)/testloadso.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testlock$(EXE): $(srcdir)/testlock.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-ifeq (@ISMACOSX@,true)
-testnative$(EXE): $(srcdir)/testnative.c \
- $(srcdir)/testnativecocoa.m \
- $(srcdir)/testutils.c \
- $(srcdir)/testnativex11.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@
-endif
-
-ifeq (@ISWINDOWS@,true)
-testnative$(EXE): $(srcdir)/testnative.c \
- $(srcdir)/testutils.c \
- $(srcdir)/testnativew32.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-endif
-
-ifeq (@ISUNIX@,true)
-testnative$(EXE): $(srcdir)/testnative.c \
- $(srcdir)/testutils.c \
- $(srcdir)/testnativex11.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
-endif
-
-ifeq (@ISOS2@,true)
-testnative$(EXE): $(srcdir)/testnative.c \
- $(srcdir)/testnativeos2.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-endif
-
-#there's probably a better way of doing this
-ifeq (@ISMACOSX@,false)
-ifeq (@ISWINDOWS@,false)
-ifeq (@ISUNIX@,false)
-ifeq (@ISOS2@,false)
-testnative$(EXE): ;
-endif
-endif
-endif
-endif
-
-testoverlay2$(EXE): $(srcdir)/testoverlay2.c $(srcdir)/testyuv_cvt.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testplatform$(EXE): $(srcdir)/testplatform.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testpower$(EXE): $(srcdir)/testpower.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testfilesystem$(EXE): $(srcdir)/testfilesystem.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testrendertarget$(EXE): $(srcdir)/testrendertarget.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testscale$(EXE): $(srcdir)/testscale.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testsem$(EXE): $(srcdir)/testsem.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testsensor$(EXE): $(srcdir)/testsensor.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testshader$(EXE): $(srcdir)/testshader.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
-
-testshape$(EXE): $(srcdir)/testshape.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testsprite2$(EXE): $(srcdir)/testsprite2.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
-
-teststreaming$(EXE): $(srcdir)/teststreaming.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
-
-testtimer$(EXE): $(srcdir)/testtimer.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testurl$(EXE): $(srcdir)/testurl.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testver$(EXE): $(srcdir)/testver.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testviewport$(EXE): $(srcdir)/testviewport.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testwm2$(EXE): $(srcdir)/testwm2.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testyuv$(EXE): $(srcdir)/testyuv.c $(srcdir)/testyuv_cvt.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-torturethread$(EXE): $(srcdir)/torturethread.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testrendercopyex$(EXE): $(srcdir)/testrendercopyex.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
-
-testmessage$(EXE): $(srcdir)/testmessage.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testdisplayinfo$(EXE): $(srcdir)/testdisplayinfo.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testqsort$(EXE): $(srcdir)/testqsort.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testbounds$(EXE): $(srcdir)/testbounds.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testcustomcursor$(EXE): $(srcdir)/testcustomcursor.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-controllermap$(EXE): $(srcdir)/controllermap.c $(srcdir)/testutils.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testvulkan$(EXE): $(srcdir)/testvulkan.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-testlocale$(EXE): $(srcdir)/testlocale.c
- $(CC) -o $@ $? $(CFLAGS) $(LIBS)
-
-testmouse$(EXE): $(srcdir)/testmouse.c
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-
-
-clean:
- rm -f $(TARGETS) *.test
-
-distclean: clean
- rm -f Makefile
- rm -f config.status config.cache config.log
- rm -rf $(srcdir)/autom4te*
-
-noninteractive = \
- testatomic$(EXE) \
- testerror$(EXE) \
- testevdev$(EXE) \
- testfilesystem$(EXE) \
- testkeys$(EXE) \
- testlocale$(EXE) \
- testplatform$(EXE) \
- testpower$(EXE) \
- testqsort$(EXE) \
- testthread$(EXE) \
- testtimer$(EXE) \
- testver$(EXE) \
- $(NULL)
-
-needs_audio = \
- testaudioinfo$(EXE) \
- testsurround$(EXE) \
- $(NULL)
-
-needs_display = \
- testbounds$(EXE) \
- testdisplayinfo$(EXE) \
- $(NULL)
-
-TESTS = $(noninteractive) $(needs_audio) $(needs_display)
-
-check:
- @set -e; \
- status=0; \
- export SDL_AUDIODRIVER=dummy; \
- export SDL_VIDEODRIVER=dummy; \
- for exe in $(TESTS); do \
- echo "$$exe..."; \
- if ./"$$exe"; then \
- echo "$$exe: OK"; \
- else \
- echo "$$exe: FAILED: $$?"; \
- status=1; \
- fi; \
- done; \
- exit "$$status"
-
-DATA = \
- axis.bmp \
- button.bmp \
- controllermap.bmp \
- controllermap_back.bmp \
- icon.bmp \
- moose.dat \
- sample.bmp \
- sample.wav \
- testgles2_sdf_img_normal.bmp \
- testgles2_sdf_img_sdf.bmp \
- testyuv.bmp \
- unifont-13.0.06.hex \
- utf8.txt \
- $(NULL)
-
-ifneq ($(srcdir), .)
-$(DATA) : %: $(srcdir)/% Makefile
- cp $< $@
-endif
-
-copydatafiles: $(DATA)
-.PHONY : copydatafiles
diff --git a/test/Makefile.os2 b/test/Makefile.os2
deleted file mode 100644
index ee66409..0000000
--- a/test/Makefile.os2
+++ /dev/null
@@ -1,18 +0,0 @@
-# Open Watcom makefile to build SDL2 tests for OS/2
-# wmake -f Makefile.os2
-#
-# To error out upon warnings: wmake -f Makefile.os2 ENABLE_WERROR=1
-
-SYSTEM = os2v2
-
-INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
-
-CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
-CFLAGS+= -wx -wcd=303
-!ifeq ENABLE_WERROR 1
-CFLAGS+= -we
-!endif
-
-TNSRCS = testnative.c testnativeos2.c
-
-!include watcom.mif
diff --git a/test/Makefile.w32 b/test/Makefile.w32
deleted file mode 100644
index 02e68e8..0000000
--- a/test/Makefile.w32
+++ /dev/null
@@ -1,21 +0,0 @@
-# Open Watcom makefile to build SDL2 tests for Win32
-# wmake -f Makefile.w32
-#
-# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
-
-SYSTEM = nt
-
-INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h" -I"../src/video/khronos"
-
-CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
-CFLAGS+= -wx -wcd=303
-!ifeq ENABLE_WERROR 1
-CFLAGS+= -we
-!endif
-CFLAGS+= -DSDL_MAIN_HANDLED
-CFLAGS+= -DHAVE_OPENGL
-GLLIBS = opengl32.lib
-
-TNSRCS = testnative.c testnativew32.c
-
-!include watcom.mif
diff --git a/test/acinclude.m4 b/test/acinclude.m4
deleted file mode 100644
index 0fdf353..0000000
--- a/test/acinclude.m4
+++ /dev/null
@@ -1,337 +0,0 @@
-# Configure paths for SDL
-# Sam Lantinga 9/21/99
-# stolen from Manish Singh
-# stolen back from Frank Belew
-# stolen from Manish Singh
-# Shamelessly stolen from Owen Taylor
-
-# serial 2
-
-dnl AM_PATH_SDL2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
-dnl
-AC_DEFUN([AM_PATH_SDL2],
-[dnl
-dnl Get the cflags and libraries from the sdl2-config script
-dnl
-AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
- sdl_prefix="$withval", sdl_prefix="")
-AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
- sdl_exec_prefix="$withval", sdl_exec_prefix="")
-AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
- , enable_sdltest=yes)
-
- min_sdl_version=ifelse([$1], ,2.0.0,$1)
-
- if test "x$sdl_prefix$sdl_exec_prefix" = x ; then
- PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version],
- [sdl_pc=yes],
- [sdl_pc=no])
- else
- sdl_pc=no
- if test x$sdl_exec_prefix != x ; then
- sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
- if test x${SDL2_CONFIG+set} != xset ; then
- SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config
- fi
- fi
- if test x$sdl_prefix != x ; then
- sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
(Patch may be truncated, please check the link at the top of this post.)