make LibSDL compliant with giteapc

This commit is contained in:
Sylvain PILLOT 2022-04-28 08:49:24 +02:00
parent c48bd9f8e4
commit 9d889cde17
6 changed files with 440 additions and 159 deletions

102
CMakeLists.txt Normal file
View File

@ -0,0 +1,102 @@
# libustl: build system
cmake_minimum_required(VERSION 3.16)
project(LibUstl VERSION 1.2.15 LANGUAGES CXX)
# Libraries that libexample depends on
find_package(Gint 2.7 REQUIRED)
# Turn include/config.h.in into a proper config.h where the @VAR@ have
# been replaced; this is how version numbers are maintained. libexample_VERSION
# is set to "1.0" by the project() command.
# Note that the input (config.h.in) is relative to the source dir, but the
# output (config.h) is in the build dir, so it doesn't pollute the Git repo.
configure_file(./include/SDL_config.h.in include/include/SDL_config.h)
set(SOURCES
src/SDL.c
src/SDL_error.c
src/SDL_fatal.c
src/audio/SDL_audio.c
src/audio/SDL_audiocvt.c
src/cpuinfo/SDL_cpuinfo.c
src/events/SDL_active.c
src/events/SDL_events.c
src/events/SDL_expose.c
src/events/SDL_keyboard.c
src/events/SDL_mouse.c
src/events/SDL_quit.c
src/events/SDL_resize.c
src/file/SDL_rwops.c
src/joystick/SDL_joystick.c
src/stdlib/SDL_getenv.c
src/stdlib/SDL_iconv.c
src/stdlib/SDL_malloc.c
src/stdlib/SDL_qsort.c
src/stdlib/SDL_stdlib.c
src/stdlib/SDL_string.c
src/thread/SDL_thread.c
src/thread/generic/SDL_syscond.c
src/thread/generic/SDL_sysmutex.c
src/thread/generic/SDL_syssem.c
src/thread/generic/SDL_systhread.c
src/timer/SDL_timer.c
src/timer/prizm/SDL_systimer.c
src/video/SDL_blit.c
src/video/SDL_blit_0.c
src/video/SDL_blit_1.c
src/video/SDL_blit_A.c
src/video/SDL_blit_N.c
src/video/SDL_bmp.c
src/video/SDL_cursor.c
src/video/SDL_gamma.c
src/video/SDL_pixels.c
src/video/SDL_RLEaccel.c
src/video/SDL_stretch.c
src/video/SDL_surface.c
src/video/SDL_video.c
src/video/SDL_yuv.c
src/video/SDL_yuv_mmx.c
src/video/SDL_yuv_sw.c
src/video/prizm/SDL_prizmevents.c
src/video/prizm/SDL_prizmfonts.c
src/video/prizm/SDL_prizmnti.c
src/video/prizm/SDL_prizmutils.c
src/video/prizm/SDL_prizmvideo.c
src/gfx/SDL_framerate.c
src/gfx/SDL_gfxBlitFunc.c
src/gfx/SDL_gfxPrimitives.c
src/gfx/SDL_imageFilter.c
src/gfx/SDL_rotozoom.c
)
include_directories(
"${PROJECT_SOURCE_DIR}/include"
"${PROJECT_BINARY_DIR}/include"
"${FXSDK_COMPILER_INSTALL}/include/SDL"
"${FXSDK_COMPILER_INSTALL}/include/openlibm")
add_compile_options(-Os -lm -m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp)
# Target name is "ustl", output file is "libustl.a" (by default)
add_library(SDL_prizm STATIC ${SOURCES})
# After building, install the target (that is, libustl.a) in the compiler
install(TARGETS SDL_prizm
DESTINATION "${FXSDK_COMPILER_INSTALL}")
# Also install the headers (our include folder gets merged with the existing
# one in the compiler's install folder). Only install files matching *.h to
# exclude config.h.in.
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/SDL"
DESTINATION "${FXSDK_COMPILER_INSTALL}/include/SDL"
FILES_MATCHING PATTERN "*.h")
# Slyvtt : replaced "*.h" with "*" as some headers are in the C++ style, without .h extension
# Install config.h from the build dir
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/SDL_config.h"
DESTINATION "${FXSDK_COMPILER_INSTALL}/include/SDL")
# Install FindLibUstl.cmake so that users can do find_package(Libustl)
install(FILES cmake/FindSDL_prizm.cmake
DESTINATION "${FXSDK_CMAKE_MODULE_PATH}")

View File

@ -0,0 +1,12 @@
# µSTL 2.3 sources for Casio Graph 90+E
Need to have a fully working gcc toolchain for SH3/SH4 architecture.
Compilation is done by using the adhoc Makefile :
`make` in the main directory
It should produce the library libustl.a
The following steps are not automatically done, so please proceed with the following manipulations :
* copy the library libustl.a into your SH3/SH4 compiler lib folder
* copy all header files contained in the include foler into the include folder of the SH3/SH4 compiler

View File

@ -2,6 +2,113 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="src/video/prizm/SDL_prizmevents_c.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1473" topLine="13" />
</Cursor>
<Folding>
<Collapse line="41" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmnti.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="988" topLine="0" />
</Cursor>
<Folding>
<Collapse line="5" />
</Folding>
</File>
<File name="src/events/SDL_events_c.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="55" />
</Cursor>
</File>
<File name="src/video/SDL_bmp.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2950" topLine="72" />
</Cursor>
<Folding>
<Collapse line="415" />
</Folding>
</File>
<File name="include/SDL_stdinc.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2433" topLine="65" />
</Cursor>
</File>
<File name="src/SDL.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1394" topLine="78" />
</Cursor>
</File>
<File name="src/video/SDL_surface.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14589" topLine="710" />
</Cursor>
</File>
<File name="src/video/SDL_pixels.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8603" topLine="83" />
</Cursor>
<Folding>
<Collapse line="36" />
<Collapse line="38" />
<Collapse line="225" />
<Collapse line="238" />
<Collapse line="251" />
<Collapse line="266" />
<Collapse line="291" />
<Collapse line="313" />
<Collapse line="340" />
<Collapse line="342" />
<Collapse line="355" />
<Collapse line="357" />
<Collapse line="370" />
<Collapse line="404" />
<Collapse line="424" />
<Collapse line="436" />
<Collapse line="464" />
<Collapse line="489" />
<Collapse line="506" />
<Collapse line="530" />
<Collapse line="531" />
<Collapse line="542" />
<Collapse line="617" />
</Folding>
</File>
<File name="src/timer/SDL_systimer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1134" topLine="3" />
</Cursor>
</File>
<File name="src/events/SDL_keyboard.c" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14509" topLine="194" />
</Cursor>
<Folding>
<Collapse line="58" />
<Collapse line="337" />
<Collapse line="342" />
<Collapse line="357" />
<Collapse line="368" />
<Collapse line="374" />
<Collapse line="378" />
<Collapse line="383" />
<Collapse line="573" />
<Collapse line="596" />
<Collapse line="609" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmvideo.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6352" topLine="195" />
</Cursor>
</File>
<File name="include/SDL_endian.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3019" topLine="87" />
</Cursor>
</File>
<File name="src/file/SDL_rwops.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17253" topLine="108" />
@ -42,48 +149,6 @@
<Collapse line="669" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmfonts.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="52" topLine="0" />
</Cursor>
<Folding>
<Collapse line="8" />
<Collapse line="268" />
<Collapse line="528" />
<Collapse line="788" />
<Collapse line="1048" />
</Folding>
</File>
<File name="src/stdlib/SDL_string.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7025" topLine="273" />
</Cursor>
</File>
<File name="include/SDL_config_prizm.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2856" topLine="91" />
</Cursor>
</File>
<File name="include/SDL_stdinc.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2433" topLine="65" />
</Cursor>
</File>
<File name="src/SDL_error.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1517" topLine="48" />
</Cursor>
</File>
<File name="include/SDL_endian.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3019" topLine="87" />
</Cursor>
</File>
<File name="include/SDL_config.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1297" topLine="15" />
</Cursor>
</File>
<File name="src/video/SDL_video.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="29549" topLine="860" />
@ -95,24 +160,14 @@
<Collapse line="1113" />
</Folding>
</File>
<File name="src/video/SDL_blit.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="include/SDL_timer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1552" topLine="468" />
<Cursor1 position="0" topLine="21" />
</Cursor>
</File>
<File name="src/events/SDL_sysevents.h" open="1" top="1" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="include/SDL_keyboard.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="include/SDL_video.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9387" topLine="274" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmvideo.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="11" />
<Cursor1 position="3548" topLine="100" />
</Cursor>
</File>
<File name="Makefile.prizm" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -120,9 +175,91 @@
<Cursor1 position="1235" topLine="26" />
</Cursor>
</File>
<File name="src/video/SDL_surface.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/video/prizm/SDL_prizmfonts.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14589" topLine="710" />
<Cursor1 position="113" topLine="2" />
</Cursor>
</File>
<File name="src/SDL_error.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1517" topLine="48" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmvideo.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="11" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmevents.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6421" topLine="150" />
</Cursor>
</File>
<File name="src/stdlib/SDL_string.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7025" topLine="273" />
</Cursor>
</File>
<File name="src/events/SDL_sysevents.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="src/events/SDL_events.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2769" topLine="6" />
</Cursor>
</File>
<File name="include/SDL_video.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8865" topLine="271" />
</Cursor>
</File>
<File name="include/SDL_keysym.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9028" topLine="337" />
</Cursor>
</File>
<File name="include/SDL_config_prizm.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2856" topLine="91" />
</Cursor>
</File>
<File name="src/video/SDL_blit.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1552" topLine="468" />
</Cursor>
</File>
<File name="src/video/SDL_blit_N.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="153" />
</Cursor>
</File>
<File name="include/SDL_error.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1459" topLine="47" />
</Cursor>
</File>
<File name="include/SDL_config.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1297" topLine="15" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmfonts.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="86166" topLine="0" />
</Cursor>
<Folding>
<Collapse line="8" />
<Collapse line="268" />
<Collapse line="528" />
<Collapse line="788" />
<Collapse line="1048" />
</Folding>
</File>
<File name="src/timer/prizm/SDL_systimer.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="4" zoom_2="0">
<Cursor>
<Cursor1 position="1839" topLine="63" />
</Cursor>
</File>
<File name="src/video/SDL_sysvideo.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -149,113 +286,14 @@
<Collapse line="443" />
</Folding>
</File>
<File name="src/video/SDL_blit_N.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="153" />
</Cursor>
</File>
<File name="src/video/SDL_pixels.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8603" topLine="83" />
</Cursor>
<Folding>
<Collapse line="36" />
<Collapse line="38" />
<Collapse line="225" />
<Collapse line="238" />
<Collapse line="251" />
<Collapse line="266" />
<Collapse line="291" />
<Collapse line="313" />
<Collapse line="340" />
<Collapse line="342" />
<Collapse line="355" />
<Collapse line="357" />
<Collapse line="370" />
<Collapse line="404" />
<Collapse line="424" />
<Collapse line="436" />
<Collapse line="464" />
<Collapse line="489" />
<Collapse line="506" />
<Collapse line="530" />
<Collapse line="531" />
<Collapse line="542" />
<Collapse line="617" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmevents.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6421" topLine="189" />
</Cursor>
</File>
<File name="src/events/SDL_keyboard.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="309" />
</Cursor>
</File>
<File name="include/SDL_keysym.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9028" topLine="30" />
</Cursor>
<Folding>
<Collapse line="31" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmfonts.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="706" topLine="7" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmutils.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="307" topLine="0" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmevents_c.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/timer/SDL_timer_c.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1473" topLine="33" />
</Cursor>
</File>
<File name="include/SDL_error.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1459" topLine="47" />
</Cursor>
</File>
<File name="src/events/SDL_events_c.h" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="55" />
</Cursor>
</File>
<File name="src/events/SDL_events.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2769" topLine="6" />
</Cursor>
</File>
<File name="src/video/SDL_bmp.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2285" topLine="65" />
</Cursor>
<Folding>
<Collapse line="417" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmnti.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="762" topLine="3" />
</Cursor>
<Folding>
<Collapse line="5" />
</Folding>
</File>
<File name="src/timer/prizm/SDL_systimer.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1475" topLine="3" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmvideo.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6352" topLine="204" />
<Cursor1 position="0" topLine="9" />
</Cursor>
</File>
</CodeBlocks_layout_file>

49
cmake/FindSDL_prizm.cmake Normal file
View File

@ -0,0 +1,49 @@
find_package(Gint 2.7 REQUIRED)
# Find libexample.a; if we had platform-specific versions we could look for
# libexample-${FXSDK_PLATFORM}.a instead.
execute_process(
COMMAND ${CMAKE_C_COMPILER} -print-file-name=libSDL_prizm.a
OUTPUT_VARIABLE EX_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
# EX_PATH is now the full path if libustl.a exists, "libustl.a" otherwise
if(NOT "${EX_PATH}" STREQUAL "libSDL_prizm.a")
# Find the version.h header
execute_process(
COMMAND ${CMAKE_C_COMPILER} -print-file-name=include/ustl/config.h
OUTPUT_VARIABLE EX_CONFIG OUTPUT_STRIP_TRAILING_WHITESPACE)
# Extract version information from the config.h header. This command prints
# the version on the line matching the regex and deletes every other line.
execute_process(
COMMAND sed -E "s/#define.*EX_VERSION\\s+\"(\\S+)\"$/\\1/p; d" ${EX_CONFIG}
OUTPUT_VARIABLE EX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# The commands above seem common for gint libraries, so the fxSDK provides a
# helper function to get that directly. We simply provide the archive name,
# header file name, macro name, and names for output variables.
# include(FindSimpleLibrary)
# find_simple_library(libexample.a include/example/config.h "EX_VERSION"
# PATH_VAR EX_PATH VERSION_VAR EX_VERSION)
# This CMake utility will handle the version comparisons and other checks. We
# just specify:
# -> Some variables that are defined only if the library is found (so if
# they're undefined, CMake will conclude libexample was not found)
# -> The version, so CMake can compare with the user's requested one
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibSDL_prizm
REQUIRED_VARS EX_CONFIG EX_VERSION
VERSION_VAR EX_VERSION)
# We now have a LibExample_FOUND variable, let's create the target that users
# can link against with target_link_libraries()
if(LibUstl_FOUND)
# This is an imported target, we don't build it, we just claim it's here
add_library(LibSDL_prizm::LibSDL_prizm UNKNOWN IMPORTED)
# Here we declare the compiler and linker flags that every user of LibExample
# needs to use.
set_target_properties(LibSDL_prizm::LibSDL_prizm PROPERTIES
# If we specify where the library comes from, CMake will watch that file
# and relink any user application when the library is updated!
IMPORTED_LOCATION "${EX_PATH}"
# Linking options
INTERFACE_LINK_OPTIONS -lSDL_prizm
# Dependencies (for order on the command-line)
IMPORTED_LINK_INTERFACE_LIBRARIES Gint::Gint)
endif()

26
giteapc.make Normal file
View File

@ -0,0 +1,26 @@
# giteapc: version=1 depends=Lephenixnoir/gint,Lephenixnoir/sh-elf-gcc,Lephenixnoir/fxsdk,Lephenixnoir/OpenLibm,Vhex-Kernel-Core/fxlibc
-include giteapc-config.make
configure:
@ fxsdk build-fx -c
@ fxsdk build-cg -c
build:
@ fxsdk build-fx
@ fxsdk build-cg
install:
@ fxsdk build-fx install
@ fxsdk build-cg install
uninstall:
@ if [ -e build-fx/install_manifest.txt ]; then \
xargs rm -f < build-fx/install_manifest.txt; \
fi
@ if [ -e build-cg/install_manifest.txt ]; then \
xargs rm -f < build-cg/install_manifest.txt; \
fi
.PHONY: configure build install uninstall

54
include/SDL_config.h.in Normal file
View File

@ -0,0 +1,54 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2012 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#ifndef _SDL_config_h
#define _SDL_config_h
#define FXCG50 1
#include "SDL_platform.h"
/* Add any platform that doesn't build using the configure system */
#if defined(__DREAMCAST__)
#include "SDL_config_dreamcast.h"
#elif defined(__MACOS__)
#include "SDL_config_macos.h"
#elif defined(__MACOSX__)
#include "SDL_config_macosx.h"
#elif defined(__SYMBIAN32__)
#include "SDL_config_symbian.h" /* must be before win32! */
#elif defined(__WIN32__)
#include "SDL_config_win32.h"
#elif defined(__OS2__)
#include "SDL_config_os2.h"
/// Added a config_file for Casio fx-CG10/20/50/PRIZM/Graph 90+E
#elif defined(__CASIOPRIZM__)
#include "SDL_config_prizm.h"
#else
#include "SDL_config_minimal.h"
#endif /* platform config */
#endif /* _SDL_config_h */