BuildSystem: cmake can now build out libc
I can't seem to get libc++ build to work...
This commit is contained in:
@@ -2,12 +2,25 @@ cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(libc CXX)
|
||||
|
||||
set(LIBC_SOURCES
|
||||
ctype.cpp
|
||||
stdio.cpp
|
||||
stdlib.cpp
|
||||
string.cpp
|
||||
unistd.cpp
|
||||
)
|
||||
|
||||
add_custom_target(libc-headers
|
||||
COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/include/* ${BANAN_INCLUDE}
|
||||
DEPENDS sysroot
|
||||
)
|
||||
|
||||
add_library(libc ${LIBC_SOURCES})
|
||||
add_dependencies(libc crt0)
|
||||
|
||||
add_custom_target(libc-install
|
||||
DEPENDS libc-headers
|
||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libc.a ${BANAN_LIB}/
|
||||
DEPENDS libc
|
||||
)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
|
||||
Reference in New Issue
Block a user