libfx: configure build and add libraries to sysroot and bsp

This commit is contained in:
2026-04-01 19:05:32 +01:00
parent 8ebf44dca9
commit f70d64759f
2 changed files with 24 additions and 1 deletions
+23
View File
@@ -1,5 +1,9 @@
file(GLOB items *)
set(fx_modules core ds serial)
set(fx_enable_floating_point 0)
set(fx_enable_tests 0)
add_subdirectory(
${CMAKE_SOURCE_DIR}/kernel/libmango
${CMAKE_CURRENT_BINARY_DIR}/libmango)
@@ -24,3 +28,22 @@ foreach(item ${items})
add_subdirectory(${item})
endforeach (item)
foreach (module ${fx_modules})
target_link_libraries(fx-${module} libc libpthread)
target_link_libraries(fx-${module}-s libc-core libc-pthread libmango)
target_link_options(fx-${module} PRIVATE -Wl,--soname,libfx-${module}.so)
rosetta_wrap_library(
NAME fx-${module}
PUBLIC_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libfx/${module}/include)
set_target_properties(fx-${module} fx-${module}-s PROPERTIES
PREFIX "lib")
sysroot_add_library(
NAME fx-${module}
HEADER_DIR /usr/include
LIB_DIR /usr/lib)
bsp_add_library(
NAME fx-${module}
LIB_DIR /usr/lib)
endforeach (module)