[teagba] Make TeaGBA (other than the ARM asm) build on all platforms
This commit is contained in:
parent
bac3eed958
commit
7c1c9a697e
7
deps/teagba/CMakeLists.txt
vendored
7
deps/teagba/CMakeLists.txt
vendored
@ -1 +1,8 @@
|
||||
add_subdirectory(src)
|
||||
|
||||
install(
|
||||
DIRECTORY
|
||||
include/teagba
|
||||
DESTINATION
|
||||
include
|
||||
)
|
||||
|
19
deps/teagba/src/CMakeLists.txt
vendored
19
deps/teagba/src/CMakeLists.txt
vendored
@ -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
22
deps/teagba/src/bios_stub.cpp
vendored
Normal 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() {}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user