refacotr (base): renamed from libc to libnx

This commit is contained in:
antifallobst 2023-04-21 14:23:50 +02:00
parent a26fb4035e
commit 810e322d55
3 changed files with 18 additions and 18 deletions

View File

@ -1,25 +1,25 @@
cmake_minimum_required(VERSION 3.00)
project(libc)
project(libnx)
set(C 99)
set(CMAKE_NASM_COMPILE_OBJECT "nasm <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
add_library(libc)
add_library(libc_asm OBJECT)
target_include_directories(libc PRIVATE inc)
file(GLOB_RECURSE libc_src_c "src/**.c")
file(GLOB_RECURSE libc_inc "inc/**.h")
file(GLOB_RECURSE libc_src_asm "src/**.asm")
add_library(libnx)
add_library(libnx_asm OBJECT)
target_include_directories(libnx PRIVATE inc)
file(GLOB_RECURSE libnx_src_c "src/**.c")
file(GLOB_RECURSE libnx_inc "inc/**.h")
file(GLOB_RECURSE libnx_src_asm "src/**.asm")
target_compile_options(libc PRIVATE -g -fno-stack-protector -fno-stack-check -ffreestanding -m64 -march=x86-64 -mabi=sysv)
target_link_options(libc PRIVATE -Bsymbolic -nostdlib -shared -fno-stack-protector)
target_compile_options(libnx PRIVATE -g -fno-stack-protector -fno-stack-check -ffreestanding -m64 -march=x86-64 -mabi=sysv)
target_link_options(libnx PRIVATE -Bsymbolic -nostdlib -shared -fno-stack-protector)
enable_language(ASM_NASM)
set(CAN_USE_ASSEMBLER TRUE)
set_target_properties(libc PROPERTIES PREFIX "")
set_target_properties(libc PROPERTIES SUFFIX ".so")
set_target_properties(libnx PROPERTIES PREFIX "")
set_target_properties(libnx PROPERTIES SUFFIX ".so")
target_sources(libc_asm PRIVATE ${libc_src_asm})
target_sources(libc PRIVATE ${libc_src_c} ${libc_inc} $<TARGET_OBJECTS:libc_asm>)
target_sources(libnx_asm PRIVATE ${libnx_src_asm})
target_sources(libnx PRIVATE ${libnx_src_c} ${libnx_inc} $<TARGET_OBJECTS:libnx_asm>)

View File

@ -1,3 +1,3 @@
# libc
# libnx
The C standard library for noxos.
The C library for noxos.

View File

@ -26,7 +26,7 @@ check_toolchain() {
}
libc_build() {
libnx_build() {
echo " --> Building the noxos standard library"
cd build/cmake
cmake -S ../.. -B .
@ -36,7 +36,7 @@ libc_build() {
}
echo "!=====[ NoxOS libc build script ]=====!"
echo "!=====[ libnx build script ]=====!"
case $1 in
"check")
@ -44,7 +44,7 @@ case $1 in
;;
*)
workspace_setup
libc_build
libnx_build
;;
esac