meta: replace cmake mono-build system with a custom build co-ordinator
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.
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
[seed]
|
||||
name = 'libfx-host'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
|
||||
[build]
|
||||
build_for = 'host'
|
||||
build_system = 'cmake'
|
||||
source_dir = 'lib/libfx'
|
||||
|
||||
[publish.cmake]
|
||||
module_paths = [ 'src:cmake/' ]
|
||||
|
||||
# vim: ft=toml
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
[seed]
|
||||
name = 'libfx'
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
source_dir = 'lib/libfx'
|
||||
configure_args = [
|
||||
'-Dfx_assemblies=fx.runtime;fx.collections;fx.serial;fx.io;fx.term;fx.cmdline',
|
||||
'-Dfx_enable_floating_point=0',
|
||||
'-Dfx_enable_tests=0',
|
||||
]
|
||||
|
||||
[publish.cmake]
|
||||
module_paths = [ 'src:cmake/' ]
|
||||
|
||||
# vim: ft=toml
|
||||
+12
-21
@@ -1,10 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc C ASM)
|
||||
|
||||
set(source_dirs core malloc io exec)
|
||||
|
||||
set(LIBC_STANDALONE FALSE)
|
||||
set(public_include_dirs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
add_subdirectory(runtime)
|
||||
|
||||
foreach (dir ${source_dirs})
|
||||
add_subdirectory(${dir})
|
||||
set(sources ${sources} ${component_sources})
|
||||
@@ -12,22 +14,11 @@ foreach (dir ${source_dirs})
|
||||
set(public_include_dirs ${public_include_dirs} ${component_public_include_dirs})
|
||||
endforeach (dir)
|
||||
|
||||
rosetta_add_library(SHARED
|
||||
NAME libc
|
||||
PUBLIC_INCLUDE_DIRS ${public_include_dirs}
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libc
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
bsp_add_library(
|
||||
NAME libc
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
target_link_libraries(libc PRIVATE librosetta libxpc-static liblaunch-static interface::fs)
|
||||
target_link_libraries(libc PUBLIC libmagenta)
|
||||
target_compile_definitions(libc PRIVATE ENABLE_GLOBAL_HEAP=1)
|
||||
|
||||
add_subdirectory(pthread)
|
||||
add_library(libc SHARED ${sources} ${headers})
|
||||
target_include_directories(libc PUBLIC ${public_include_dirs})
|
||||
target_link_libraries(libc PRIVATE rosetta libxpc.a liblaunch.a libmagenta.a)
|
||||
target_compile_options(libc PRIVATE -ffreestanding -nostdlib)
|
||||
target_link_options(libc PRIVATE -ffreestanding -nostdlib)
|
||||
target_compile_definitions(libc PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_SHARED=1)
|
||||
set_target_properties(libc PROPERTIES PREFIX "")
|
||||
install(TARGETS libc)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
if (LIBC_STANDALONE)
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc-core C ASM)
|
||||
endif ()
|
||||
|
||||
set(source_dirs assert stdio stdlib string errno ctype wctype unistd)
|
||||
|
||||
foreach (dir ${source_dirs})
|
||||
@@ -12,18 +17,16 @@ file(GLOB sys_sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sys/${CMAKE_SYSTEM_PROCESSOR}/*.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sys/${CMAKE_SYSTEM_PROCESSOR}/*.S)
|
||||
|
||||
set(component_sources ${sources} ${sys_sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
|
||||
rosetta_add_library(STATIC
|
||||
NAME libc-core
|
||||
PUBLIC_INCLUDE_DIRS ${public_include_dirs}
|
||||
SOURCES ${sources} ${sys_sources}
|
||||
HEADERS ${headers})
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libc-core
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
if (NOT LIBC_STANDALONE)
|
||||
set(component_sources ${sources} ${sys_sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
add_library(libc-core STATIC ${sources} ${sys_sources} ${headers})
|
||||
target_include_directories(libc-core PUBLIC ${public_include_dirs})
|
||||
target_link_libraries(libc-core PRIVATE libmagenta librosetta)
|
||||
target_compile_definitions(libc-core PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_STATIC=1)
|
||||
set_target_properties(libc-core PROPERTIES
|
||||
PREFIX "")
|
||||
install(TARGETS libc-core)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[seed]
|
||||
name = 'libc-core'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'libc-headers',
|
||||
'libmagenta',
|
||||
'librosetta'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [
|
||||
'-DLIBC_STANDALONE=TRUE'
|
||||
]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -1,5 +1,10 @@
|
||||
set(source_dirs unistd spawn)
|
||||
|
||||
if (LIBC_STANDALONE)
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc-exec C ASM)
|
||||
endif ()
|
||||
|
||||
file(GLOB sources *.c *.h)
|
||||
|
||||
foreach (dir ${source_dirs})
|
||||
@@ -13,21 +18,17 @@ endforeach (dir)
|
||||
file(GLOB_RECURSE sub_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
|
||||
set(headers ${headers} ${sub_headers})
|
||||
|
||||
set(component_sources ${sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
set(component_public_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
|
||||
rosetta_add_library(STATIC
|
||||
NAME libc-exec
|
||||
PUBLIC_INCLUDE_DIRS
|
||||
${public_include_dirs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libc-exec
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
if (NOT LIBC_STANDALONE)
|
||||
set(component_sources ${sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
set(component_public_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
endif ()
|
||||
|
||||
add_library(libc-exec STATIC ${sources} ${headers})
|
||||
target_include_directories(libc-exec PUBLIC
|
||||
${public_include_dirs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_link_libraries(libc-exec libc-core libc-io libmagenta liblaunch-static)
|
||||
target_compile_definitions(libc-exec PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_STATIC=1)
|
||||
set_target_properties(libc-exec PROPERTIES PREFIX "")
|
||||
install(TARGETS libc-exec)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[seed]
|
||||
name = 'libc-exec'
|
||||
|
||||
[dependency]
|
||||
seeds = [
|
||||
'libc-core',
|
||||
'libc-io',
|
||||
'libmagenta',
|
||||
'liblaunch-static',
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [
|
||||
'-DLIBC_STANDALONE=TRUE'
|
||||
]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -0,0 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc-headers C)
|
||||
|
||||
file(GLOB headers *.h)
|
||||
file(GLOB sys_headers sys/*.h)
|
||||
|
||||
install(FILES ${headers} DESTINATION include)
|
||||
install(FILES ${sys_headers} DESTINATION include/sys)
|
||||
@@ -0,0 +1,16 @@
|
||||
[seed]
|
||||
name = 'libc-headers'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
|
||||
[build]
|
||||
build_system = 'source-only'
|
||||
build_for = 'target'
|
||||
watch_files = [ 'src:**' ]
|
||||
|
||||
[install]
|
||||
"/usr/include" = [ 'src:*.h' ]
|
||||
"/usr/include/sys" = [ 'src:sys/*.h' ]
|
||||
|
||||
# vim: ft=toml
|
||||
+19
-17
@@ -1,5 +1,10 @@
|
||||
set(source_dirs unistd stdio)
|
||||
|
||||
if (LIBC_STANDALONE)
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc-io C ASM)
|
||||
endif ()
|
||||
|
||||
file(GLOB sources *.c *.h)
|
||||
|
||||
foreach (dir ${source_dirs})
|
||||
@@ -13,21 +18,18 @@ endforeach (dir)
|
||||
file(GLOB_RECURSE sub_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
|
||||
set(headers ${headers} ${sub_headers})
|
||||
|
||||
set(component_sources ${sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
set(component_public_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
if (NOT LIBC_STANDALONE)
|
||||
set(component_sources ${sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
set(component_public_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
rosetta_add_library(STATIC
|
||||
NAME libc-io
|
||||
PUBLIC_INCLUDE_DIRS
|
||||
${public_include_dirs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libc-io
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
target_link_libraries(libc-io libc-core interface::fs libxpc-static libmagenta)
|
||||
add_library(libc-io STATIC ${sources} ${headers})
|
||||
target_include_directories(libc-io PUBLIC
|
||||
${public_include_dirs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_link_libraries(libc-io libc-core libxpc.a libmagenta)
|
||||
target_compile_definitions(libc-io PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_STATIC=1)
|
||||
set_target_properties(libc-io PROPERTIES PREFIX "")
|
||||
install(TARGETS libc-io)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
[seed]
|
||||
name = 'libc-io'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'libmagenta',
|
||||
'libc-core',
|
||||
'librosetta-interface',
|
||||
'libxpc-static'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [
|
||||
'-DLIBC_STANDALONE=TRUE'
|
||||
]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[seed]
|
||||
name = 'libc'
|
||||
|
||||
[dependency]
|
||||
seeds = [
|
||||
'libc-headers',
|
||||
'libmagenta',
|
||||
'librosetta',
|
||||
'libxpc-static',
|
||||
'liblaunch-static',
|
||||
'librosetta-interface'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -1,5 +1,10 @@
|
||||
set(source_dirs stdlib string)
|
||||
|
||||
if (LIBC_STANDALONE)
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc-malloc C ASM)
|
||||
endif ()
|
||||
|
||||
file(GLOB sources *.c *.h)
|
||||
|
||||
foreach (dir ${source_dirs})
|
||||
@@ -13,22 +18,17 @@ endforeach (dir)
|
||||
file(GLOB_RECURSE sub_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
|
||||
set(headers ${headers} ${sub_headers})
|
||||
|
||||
set(component_sources ${sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
set(component_public_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
|
||||
rosetta_add_library(STATIC
|
||||
NAME libc-malloc
|
||||
PUBLIC_INCLUDE_DIRS
|
||||
${public_include_dirs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libc-malloc
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
if (NOT LIBC_STANDALONE)
|
||||
set(component_sources ${sources} PARENT_SCOPE)
|
||||
set(component_headers ${headers} PARENT_SCOPE)
|
||||
set(component_public_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
endif ()
|
||||
|
||||
add_library(libc-malloc STATIC ${sources} ${headers})
|
||||
target_compile_definitions(libc-malloc PRIVATE LIBC_STATIC=1 ENABLE_GLOBAL_HEAP=1)
|
||||
target_include_directories(libc-malloc PUBLIC ${public_include_dirs} include)
|
||||
target_compile_definitions(libc-malloc PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_STATIC=1)
|
||||
target_link_libraries(libc-malloc libc-core libmagenta)
|
||||
set_target_properties(libc-malloc PROPERTIES PREFIX "")
|
||||
install(TARGETS libc-malloc)
|
||||
install(FILES ${sub_headers} DESTINATION include/heap)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[seed]
|
||||
name = 'libc-malloc'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'libmagenta',
|
||||
'libc-core'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [
|
||||
'-DLIBC_STANDALONE=TRUE'
|
||||
]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -1,4 +1,7 @@
|
||||
set(pthread_source_dirs thread)
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc-pthread C ASM)
|
||||
|
||||
set(pthread_source_dirs thread mutex)
|
||||
|
||||
foreach (dir ${pthread_source_dirs})
|
||||
file(GLOB dir_sources ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*.c)
|
||||
@@ -17,30 +20,27 @@ set(pthread_sources ${pthread_sources} ${pthread_sys_sources})
|
||||
set(pthread_headers ${pthread_headers} ${CMAKE_CURRENT_SOURCE_DIR}/include/pthread.h)
|
||||
set(pthread_public_include_dir ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
rosetta_add_library(STATIC
|
||||
NAME libc-pthread
|
||||
PUBLIC_INCLUDE_DIRS ${pthread_public_include_dir}
|
||||
SOURCES ${pthread_sources}
|
||||
HEADERS ${pthread_headers})
|
||||
rosetta_add_library(SHARED
|
||||
NAME libpthread
|
||||
PUBLIC_INCLUDE_DIRS ${pthread_public_include_dir}
|
||||
SOURCES ${pthread_sources}
|
||||
HEADERS ${pthread_headers})
|
||||
if (PTHREAD_STATIC)
|
||||
add_library(libc-pthread STATIC ${pthread_sources} ${pthread_headers})
|
||||
target_link_libraries(libc-pthread PRIVATE libc-io libmagenta)
|
||||
target_include_directories(libc-pthread PUBLIC
|
||||
${public_include_dirs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
set_target_properties(libc-pthread PROPERTIES PREFIX "")
|
||||
target_compile_definitions(libc-pthread PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_STATIC=1)
|
||||
install(TARGETS libc-pthread)
|
||||
else ()
|
||||
add_library(libpthread SHARED ${pthread_sources} ${pthread_headers})
|
||||
target_link_libraries(libpthread PRIVATE magenta)
|
||||
target_link_libraries(libpthread PUBLIC c)
|
||||
target_include_directories(libpthread PUBLIC
|
||||
${public_include_dirs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
set_target_properties(libpthread PROPERTIES PREFIX "")
|
||||
target_compile_options(libpthread PRIVATE -ffreestanding -nostdlib)
|
||||
target_link_options(libpthread PRIVATE -ffreestanding -nostdlib)
|
||||
target_compile_definitions(libpthread PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_SHARED=1)
|
||||
install(TARGETS libpthread)
|
||||
endif ()
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libc-pthread
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
sysroot_add_library(
|
||||
NAME libpthread
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
bsp_add_library(
|
||||
NAME libpthread
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
target_link_libraries(libc-pthread PRIVATE libc-io libmagenta)
|
||||
target_link_libraries(libpthread PRIVATE libmagenta)
|
||||
target_link_libraries(libpthread PUBLIC libc)
|
||||
install(FILES include/pthread.h DESTINATION include)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[seed]
|
||||
name = 'libc-pthread'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'libmagenta',
|
||||
'libc-io'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [
|
||||
'-DPTHREAD_STATIC=TRUE'
|
||||
]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -0,0 +1,7 @@
|
||||
[seed]
|
||||
name = 'libpthread'
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -1,10 +1,16 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc-runtime C ASM)
|
||||
|
||||
file(GLOB runtime_sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_PROCESSOR}/*.s)
|
||||
|
||||
rosetta_add_object_library(
|
||||
NAME libc-runtime STATIC
|
||||
SOURCES ${runtime_sources})
|
||||
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)
|
||||
|
||||
sysroot_add_object_library(
|
||||
NAME libc-runtime
|
||||
LIB_DIR /usr/lib)
|
||||
add_library(libc-runtime OBJECT ${runtime_sources})
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[seed]
|
||||
name = 'libc-runtime'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [
|
||||
'-DLIBC_STANDALONE=TRUE'
|
||||
]
|
||||
|
||||
# vim: ft=toml
|
||||
+16
-22
@@ -1,33 +1,27 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(fs C ASM)
|
||||
|
||||
file(GLOB sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/interface/*.c)
|
||||
file(GLOB headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/fs/*.h)
|
||||
file(GLOB public_headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/fs/*.h)
|
||||
|
||||
set(public_include_dirs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
rosetta_add_library(
|
||||
NAME libfs SHARED STATIC
|
||||
PUBLIC_INCLUDE_DIRS ${public_include_dirs}
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
if (FS_STATIC)
|
||||
add_library(fs STATIC ${sources} ${headers})
|
||||
target_link_libraries(fs magenta libc-core libxpc.a)
|
||||
set_target_properties(fs PROPERTIES POSITION_INDEPENDENT_CODE FALSE)
|
||||
else ()
|
||||
add_library(fs SHARED ${sources} ${headers})
|
||||
target_link_libraries(fs magenta c xpc)
|
||||
endif ()
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libfs
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
sysroot_add_library(
|
||||
NAME libfs-static
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
bsp_add_library(
|
||||
NAME libfs
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
target_link_libraries(libfs libmagenta interface::fs libc libxpc)
|
||||
target_link_libraries(libfs-static libmagenta interface::fs libc-core libxpc-static)
|
||||
|
||||
set_target_properties(libfs-static PROPERTIES POSITION_INDEPENDENT_CODE FALSE)
|
||||
target_include_directories(fs PUBLIC include)
|
||||
install(TARGETS fs)
|
||||
install(FILES ${public_headers} DESTINATION include/fs)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[seed]
|
||||
name = 'libfs-static'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'libxpc-static',
|
||||
'liblaunch-static',
|
||||
'librosetta-interface'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [ '-DFS_STATIC=TRUE' ]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -0,0 +1,13 @@
|
||||
[seed]
|
||||
name = 'libfs'
|
||||
|
||||
[dependency]
|
||||
seeds = [
|
||||
'libxpc',
|
||||
'librosetta-interface'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
|
||||
# vim: ft=toml
|
||||
+1
-1
Submodule lib/libfx updated: 20dc844c9d...9da33eec71
@@ -1,25 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(launch C ASM)
|
||||
|
||||
file(GLOB sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
file(GLOB headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/launch.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h)
|
||||
file(GLOB public_headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/launch.h)
|
||||
|
||||
set(public_include_dirs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
rosetta_add_library(
|
||||
NAME liblaunch SHARED STATIC
|
||||
PUBLIC_INCLUDE_DIRS ${public_include_dirs}
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
if (LAUNCH_STATIC)
|
||||
add_library(launch STATIC ${sources} ${headers})
|
||||
target_link_libraries(launch PRIVATE librosetta libmagenta libc-core)
|
||||
else ()
|
||||
add_library(launch SHARED ${sources} ${headers})
|
||||
target_link_libraries(launch PRIVATE rosetta magenta c)
|
||||
endif ()
|
||||
|
||||
sysroot_add_library(
|
||||
NAME liblaunch
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
bsp_add_library(
|
||||
NAME liblaunch
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
target_link_libraries(liblaunch-static PRIVATE librosetta libmagenta libc-core)
|
||||
target_link_libraries(liblaunch PRIVATE librosetta libmagenta libc)
|
||||
target_include_directories(launch PUBLIC include)
|
||||
install(TARGETS launch)
|
||||
install(FILES ${public_headers} DESTINATION include)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[seed]
|
||||
name = 'liblaunch-static'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'librosetta',
|
||||
'libmagenta',
|
||||
'libc-core'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [ '-DLAUNCH_STATIC=TRUE' ]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -0,0 +1,7 @@
|
||||
[seed]
|
||||
name = 'liblaunch'
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -1,15 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(librosetta C ASM)
|
||||
|
||||
file(GLOB sources *.c)
|
||||
file(GLOB headers include/rosetta/*.h)
|
||||
|
||||
rosetta_add_library(
|
||||
NAME librosetta STATIC
|
||||
PUBLIC_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
add_library(rosetta STATIC ${sources} ${headers})
|
||||
target_include_directories(rosetta PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
sysroot_add_library(
|
||||
NAME librosetta
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
target_link_libraries(rosetta PRIVATE libmagenta)
|
||||
|
||||
target_link_libraries(librosetta PRIVATE libmagenta)
|
||||
install(TARGETS rosetta)
|
||||
install(FILES ${headers} DESTINATION include/rosetta)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[seed]
|
||||
name = 'librosetta'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'libmagenta',
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
|
||||
# vim: ft=toml
|
||||
+16
-16
@@ -1,28 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(xpc C ASM)
|
||||
|
||||
file(GLOB sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
file(GLOB headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/xpc/*.h)
|
||||
|
||||
file(GLOB public_headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/xpc/*.h)
|
||||
|
||||
set(public_include_dirs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
rosetta_add_library(
|
||||
NAME libxpc SHARED STATIC
|
||||
PUBLIC_INCLUDE_DIRS ${public_include_dirs}
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
if (XPC_STATIC)
|
||||
add_library(xpc STATIC ${sources} ${headesr})
|
||||
target_link_libraries(xpc magenta libc-core)
|
||||
else ()
|
||||
add_library(xpc SHARED ${sources} ${headesr})
|
||||
target_link_libraries(xpc magenta c)
|
||||
endif ()
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libxpc
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
sysroot_add_library(
|
||||
NAME libxpc-static
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
target_link_libraries(libxpc libmagenta libc)
|
||||
target_link_libraries(libxpc-static libmagenta libc-core)
|
||||
target_include_directories(xpc PUBLIC ${public_include_dirs})
|
||||
|
||||
install(TARGETS xpc)
|
||||
install(FILES ${public_headers} DESTINATION include/xpc)
|
||||
#set_target_properties(libxpc-static PROPERTIES POSITION_INDEPENDENT_CODE FALSE)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[seed]
|
||||
name = 'libxpc-static'
|
||||
|
||||
[dependency]
|
||||
no_standard_dependencies = true
|
||||
seeds = [
|
||||
'libmagenta',
|
||||
'libc-core'
|
||||
]
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
configure_args = [ '-DXPC_STATIC=TRUE' ]
|
||||
|
||||
# vim: ft=toml
|
||||
@@ -0,0 +1,7 @@
|
||||
[seed]
|
||||
name = 'libxpc'
|
||||
|
||||
[build]
|
||||
build_system = 'cmake'
|
||||
|
||||
# vim: ft=toml
|
||||
Reference in New Issue
Block a user