From 7861a52adf92a083bb2aed4c35f98d8035dce032 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 7 Jul 2025 13:22:53 +0200 Subject: Setup project skeleton --- src/libc/CMakeLists.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/libc/CMakeLists.txt') diff --git a/src/libc/CMakeLists.txt b/src/libc/CMakeLists.txt index 952df35..309e47a 100644 --- a/src/libc/CMakeLists.txt +++ b/src/libc/CMakeLists.txt @@ -1,4 +1,4 @@ -# wanix, a Unix-like operating system for WebAssembly +# wnix, a Unix-like operating system for WebAssembly applications. # Copyright (C) 2025 Xavier Del Campo Romero # # This program is free software: you can redistribute it and/or modify @@ -15,16 +15,17 @@ # along with this program. If not, see . set(src - "src/errno.c" - "src/free.c" - "src/malloc.c" - "src/memcmp.c" - "src/memcpy.c" - "src/memset.c" - "src/strchr.c" - "src/streams.c" - "src/strerror.c" - "src/strlen.c" + printf/printf.c + tinyalloc/tinyalloc.c ) add_library(c ${src}) -target_include_directories(c PUBLIC "include" PRIVATE "private_include") +add_subdirectory(src) +add_subdirectory(newlib) +target_include_directories(c PUBLIC include printf + PRIVATE private_include tinyalloc) + +target_compile_definitions(c PRIVATE TA_DISABLE_SPLIT TA_DISABLE_COMPACT) + +if(NOT LIBC_FREESTANDING) + target_link_libraries(c PRIVATE aio fs drv) +endif() -- cgit v1.2.3