# nxos-sdk **Repository Path**: BookOS/nxos-sdk ## Basic Information - **Project Name**: nxos-sdk - **Description**: 基于nxos的SDK,可以编译一个应用程序,不受编译框架限制,支持cmake,makefile,scons等等。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-09-25 - **Last Updated**: 2023-10-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # NXOS-SDK ## Prerequisite * host c/c++ compiler. (gcc or clang) * make * cmake * ninja (optional) ## Build from source 1. update the gitmodules ```shell git submodule update --init --depth 1 ``` 2. build the clang, lld and llvm tools using the host c/c++ compiler. ```shell make build-clang ``` 3. build the baselib(libnxos, libxlibc), llvm runtimes(libc++, libc++abi, etc.) using the clang. ```shell make build-runtimes-riscv64 # build the riscv64 target library. make build-runtimes-x86 # build the x86 target library. ``` 4. Install the clang, baselib and runtimes. ```shell make build-clang # install the clang,lld and llvm tools. make install-runtimes-riscv64 # install the riscv64 target library. make install-runtimes-x86 # install the x86 target library. ``` ### Misc **Available ARCHs: riscv64, x86** Other goals: * ```make``` or ```make help```: Show the help message. * ```make distclan```: Delete all generated files in build directory. * ```make clean-```: Clean the build for the arch. Available Variables: * ```PREFIX```: Set the install directory, default: ```/opt/nxos-sdk```. * ```O```: Set the build directory, default: ```./build```. * ```HOST_CC```: Set the host c compiler to build clang. * ```HOST_CXX```: Set the host cxx compiler to build clang. ## Usage Example repo: https://gitee.com/yanghaku/nxos-cpp-helloworld