[teagba] Make TeaGBA (other than the ARM asm) build on all platforms

This commit is contained in:
Gary Talent 2023-06-18 22:59:01 -05:00
parent bac3eed958
commit 7c1c9a697e
3 changed files with 41 additions and 7 deletions

View File

@ -1 +1,8 @@
add_subdirectory(src)
install(
DIRECTORY
include/teagba
DESTINATION
include
)

View File

@ -1,18 +1,23 @@
enable_language(CXX ASM)
set_source_files_properties(gfx.cpp PROPERTIES COMPILE_FLAGS -marm)
add_library(
TeaGBA
bios.s
gba_crt0.s
cstartup.cpp
gfx.cpp
)
if(NOT MSVC)
target_compile_options(TeaGBA PRIVATE -Wsign-conversion)
target_compile_options(TeaGBA PRIVATE -Wconversion)
if(TURBINE_BUILD_TYPE STREQUAL "GBA")
set_source_files_properties(gfx.cpp PROPERTIES COMPILE_FLAGS -marm)
target_sources(
TeaGBA PRIVATE
bios.s
gba_crt0.s
)
else()
target_sources(
TeaGBA PRIVATE
bios_stub.cpp
)
endif()
target_include_directories(

22
deps/teagba/src/bios_stub.cpp vendored Normal file
View File

@ -0,0 +1,22 @@
/*
* Copyright 2016 - 2023 gary@drinkingtea.net
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// stubs for building TeaGBA for PC targets, for purposes of not having to
// switch back and forth between builds when editing GBA files
extern "C" {
void teagba_halt() {}
void teagba_stop() {}
void teagba_intrwait(unsigned, unsigned) {}
void teagba_vblankintrwait() {}
}