[nostalgia/core/gba] Move cstartup.cpp to NostalgiaCore-GBA

This commit is contained in:
Gary Talent 2020-02-11 21:45:48 -06:00
parent 553cde0d0c
commit 9d4d3cd331
3 changed files with 16 additions and 1 deletions

View File

@ -2,7 +2,6 @@ enable_language(C ASM)
add_library(
GbaStartup
gba_crt0.s
cstartup.cpp
)
target_link_libraries(

View File

@ -1,6 +1,7 @@
if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
add_library(
NostalgiaCore-GBA
cstartup.cpp
core.cpp
gfx.cpp
media.cpp

View File

@ -1,3 +1,10 @@
/*
* Copyright 2016 - 2020 gtalent2@gmail.com
*
* 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/.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
@ -7,6 +14,13 @@ extern void (*__preinit_array_end[]) (void);
extern void (*__init_array_start[]) (void);
extern void (*__init_array_end[]) (void);
namespace nostalgia::core {
void initHeap();
}
extern "C" {
void __libc_init_array() {
@ -24,6 +38,7 @@ int main(int argc, const char **argv);
int c_start() {
const char *args[2] = {"", "rom.oxfs"};
nostalgia::core::initHeap();
return main(2, args);
}