diff --git a/.gitignore b/.gitignore index 3b3e4f6..ae043f6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__/ compile_commands.json sysroot/bin +sysroot/usr/bin diff --git a/CMakeLists.txt b/CMakeLists.txt index fb00460..ae70f18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,4 +15,5 @@ set(BASE_LINK_FLAGS "-nostdlib") add_subdirectory(zion) add_subdirectory(lib) add_subdirectory(yunq) +add_subdirectory(usr) add_subdirectory(sys) diff --git a/usr/CMakeLists.txt b/usr/CMakeLists.txt new file mode 100644 index 0000000..083abbf --- /dev/null +++ b/usr/CMakeLists.txt @@ -0,0 +1,2 @@ + +add_subdirectory(testbed) diff --git a/usr/testbed/CMakeLists.txt b/usr/testbed/CMakeLists.txt new file mode 100644 index 0000000..792290a --- /dev/null +++ b/usr/testbed/CMakeLists.txt @@ -0,0 +1,21 @@ + +add_executable(testbed + test.cpp + ) + +target_include_directories(testbed + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + +target_link_libraries(testbed + mammoth +) + +set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") + +set_target_properties(testbed PROPERTIES + COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_COMPILE_FLAGS}" + LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${BASE_LINK_FLAGS}" +) + +install(TARGETS testbed DESTINATION usr/bin) + diff --git a/usr/testbed/test.cpp b/usr/testbed/test.cpp new file mode 100644 index 0000000..ef3f2eb --- /dev/null +++ b/usr/testbed/test.cpp @@ -0,0 +1,7 @@ +#include + +uint64_t main(uint64_t init_port_cap) { + dbgln("testbed"); + + return glcr::OK; +}