1ec33767ab
every system component now has its own self-contained build system, and a seed file describing the component and its build system and dependencies. a new tool, meadow, collects and uses these seed files to build the components into a full system. meadow also manages the target system root and a host prefix where toolchain tools are installed to. the build system has also been updated to use a new $ARCH-rosetta-gcc compiler, and the patches files necessary to build it have been added to toolchain/cross-compiler.
17 lines
614 B
CMake
17 lines
614 B
CMake
cmake_minimum_required(VERSION 3.31)
|
|
project(libc-runtime C ASM)
|
|
|
|
file(GLOB runtime_sources
|
|
${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_PROCESSOR}/*.s)
|
|
|
|
foreach (s ${runtime_sources})
|
|
get_filename_component(object_name ${s} NAME)
|
|
get_filename_component(object_basename ${s} NAME_WE)
|
|
# TODO find a better way of finding the compiled object files
|
|
set(object_path
|
|
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/libc-runtime.dir/${CMAKE_SYSTEM_PROCESSOR}/${object_name}.obj)
|
|
install(FILES ${object_path} DESTINATION lib RENAME "${object_basename}.o")
|
|
endforeach (s)
|
|
|
|
add_library(libc-runtime OBJECT ${runtime_sources})
|