Compare commits

...

2 Commits

6 changed files with 68 additions and 1 deletions

View File

@ -9,7 +9,7 @@ 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 "libnx/inc/**.h")
file(GLOB_RECURSE libnx_inc "inc/**.h")
file(GLOB_RECURSE libnx_src_asm "src/**.asm")

1
libnxdrv/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build

9
libnxdrv/LICENSE Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2023 The noxos project
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

44
libnxdrv/build.sh Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/bash
# This file is part of noxos and licensed under the MIT open source license
set -e
workspace_setup() {
echo " --> Setting up workspace"
mkdir -pv build
echo ""
}
check_toolchain() {
echo " --> Checking Toolchain"
hash gcc
echo " |--> found gcc"
hash ld
echo " |--> found ld"
echo " --> All checks passed"
}
libnxdrv_build() {
echo " --> Building the noxos standard library driver interface"
gcc src/libnxdrv.c -o build/libnxdrv.so -Iinc -nostdlib -nolibc -Bsymbolic --shared
echo ""
}
echo "!=====[ libnx build script ]=====!"
case $1 in
"check")
check_toolchain
;;
*)
workspace_setup
libnxdrv_build
;;
esac
echo "!=====[ Finished ]=====!"

8
libnxdrv/inc/libnxdrv.h Normal file
View File

@ -0,0 +1,8 @@
// This file is part of noxos and licensed under the MIT open source license
#ifndef NOXOS_LIBNXDRV_H
#define NOXOS_LIBNXDRV_H
void nx_drv_init();
#endif //NOXOS_LIBNXDRV_H

5
libnxdrv/src/libnxdrv.c Normal file
View File

@ -0,0 +1,5 @@
// This file is part of noxos and licensed under the MIT open source license
int nx_drv_init() {
}