mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-16 17:51:42 +00:00
feat(userspace/libc): implement functions for porting apps
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@@ -2,4 +2,6 @@ cmake_minimum_required(VERSION 3.10)
|
||||
project(FennixStandardLibraries)
|
||||
|
||||
add_subdirectory(libm)
|
||||
add_subdirectory(librt)
|
||||
add_subdirectory(libpthread)
|
||||
add_subdirectory(libstdc++)
|
||||
|
15
Userspace/libc/libs/libpthread/CMakeLists.txt
Normal file
15
Userspace/libc/libs/libpthread/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(FennixRealTimeLibrary)
|
||||
|
||||
set(SOURCES libpthread.c)
|
||||
|
||||
add_library(pthread STATIC ${SOURCES})
|
||||
add_library(pthread_shared SHARED ${SOURCES})
|
||||
|
||||
target_link_options(pthread_shared PRIVATE -nostdlib)
|
||||
set_target_properties(pthread_shared PROPERTIES OUTPUT_NAME "pthread")
|
||||
|
||||
install(TARGETS pthread pthread_shared
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include)
|
18
Userspace/libc/libs/libpthread/libpthread.c
Normal file
18
Userspace/libc/libs/libpthread/libpthread.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
This file is part of Fennix Userspace.
|
||||
|
||||
Fennix Userspace is free software: you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
Fennix Userspace is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Fennix Userspace. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* dummy file */
|
15
Userspace/libc/libs/librt/CMakeLists.txt
Normal file
15
Userspace/libc/libs/librt/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(FennixRealTimeLibrary)
|
||||
|
||||
set(SOURCES librt.c)
|
||||
|
||||
add_library(rt STATIC ${SOURCES})
|
||||
add_library(rt_shared SHARED ${SOURCES})
|
||||
|
||||
target_link_options(rt_shared PRIVATE -nostdlib)
|
||||
set_target_properties(rt_shared PROPERTIES OUTPUT_NAME "rt")
|
||||
|
||||
install(TARGETS rt rt_shared
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include)
|
18
Userspace/libc/libs/librt/librt.c
Normal file
18
Userspace/libc/libs/librt/librt.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
This file is part of Fennix Userspace.
|
||||
|
||||
Fennix Userspace is free software: you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
Fennix Userspace is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Fennix Userspace. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* dummy file */
|
Reference in New Issue
Block a user