improvements on fpc

This commit is contained in:
2026-01-01 02:14:54 +02:00
parent 773a541199
commit 0b8fb15420
31 changed files with 143 additions and 82 deletions

View File

@@ -0,0 +1,6 @@
[x86_64-linux-android]
sysroot = "/home/kotofyt/Android/Sdk/ndk/29.0.13599879/toolchains/llvm/prebuilt/linux-x86_64/sysroot"
CLANG_LINKER_INTERFACE_NAME = "/home/kotofyt/Android/Sdk/ndk/29.0.13599879/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++"
[Android_Build_Tools]
path = "/home/kotofyt/Android/Sdk/build-tools/36.0.0"

View File

@@ -16,8 +16,11 @@ DECLARE_BUILD_STAGE(android_build)
compileProject.m_szName = "android_app";
compileProject.m_androidmanifest = manifest;
compileProject.bFPIC = true;
compileProject.m_target = Target_t::HostTarget();
compileProject.m_target.kernel = TARGET_KERNEL_ANDROID;
compileProject.files = {
"main.c",
"android_native_app_glue.c",
};
LinkProject_t ldProject = ccompiler->Compile(&compileProject);
ldProject.libraries = {

View File

@@ -17,7 +17,6 @@ static void handle_cmd(struct android_app* app, int32_t cmd) {
}
}
// Entry point for native app
void android_main(struct android_app* app) {
app->onAppCmd = handle_cmd;
@@ -26,7 +25,6 @@ void android_main(struct android_app* app) {
int events;
struct android_poll_source* source;
// Main event loop
while (1) {
int ident;
while ((ident = ALooper_pollOnce(0, NULL, &events, (void**)&source)) >= 0) {
@@ -37,6 +35,5 @@ void android_main(struct android_app* app) {
}
}
// Here you can update your game/render loop
}
}

Binary file not shown.