diff options
author | Oxore <oxore@protonmail.com> | 2023-03-07 16:05:46 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-03-07 17:58:42 +0300 |
commit | 5f7d4d6e9f47d328e7c4ef71030bdc9e34892798 (patch) | |
tree | 1f4dbecf6b27e268c0590404399c5d5fd91965d0 /CMakeLists.txt | |
parent | e4a9be2a4f68781d318770296a50f4823c419805 (diff) |
Get rid of libc, take just parts of it
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 19748b0..11a1a0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,11 +81,35 @@ set(nixie_clock_sources "app/platform/stm32f0-gcc/startup/startup.cpp" ) -set_source_files_properties("third_party/FreeRTOS/queue.c" PROPERTIES - COMPILE_FLAGS -Wno-cast-align) +set(newlib_sources + "third_party/newlib/string/memcmp.c" + "third_party/newlib/string/memcpy.c" + "third_party/newlib/string/memmove.c" + "third_party/newlib/string/memset.c" + "third_party/newlib/stdlib/abort.c" + ) + +set(printf_sources + "third_party/printf/printf.c" + ) + +set_source_files_properties( + "third_party/printf/printf.c" + PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/third_party" + COMPILE_DEFINITIONS PRINTF_INCLUDE_CONFIG_H=1) + +set_source_files_properties( + "third_party/FreeRTOS/queue.c" + "third_party/newlib/string/memcmp.c" + "third_party/newlib/string/memcpy.c" + "third_party/newlib/string/memmove.c" + "third_party/newlib/string/memset.c" + PROPERTIES COMPILE_FLAGS -Wno-cast-align) add_executable(${PROJECT_NAME} ${nixie_clock_sources} + ${newlib_sources} + ${printf_sources} ) target_include_directories(${PROJECT_NAME} PRIVATE @@ -95,9 +119,9 @@ target_include_directories(${PROJECT_NAME} PRIVATE "third_party/FreeRTOS/include" "third_party/TouchSense" "third_party/STM32F0xx_StdPeriph_Driver/inc" - "app/time" "app" "app/platform/stm32f0-gcc/freertos" + "." ) target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -150,7 +174,6 @@ link_directories( ) target_link_libraries(${PROJECT_NAME} - c gcc ) |