set (STMSRC_INCLUDES
	../Inc
	)

set(STMSRC_SOURCES
	stm32f0xx_csl.c
	system_stm32f0xx.c
	)

add_library(stmSources ${STMSRC_SOURCES})
target_compile_options(stmSources PRIVATE ${C_FLAGS})
target_compile_definitions(stmSources PRIVATE ${C_DEFS})
target_include_directories(stmSources PUBLIC ${STMSRC_INCLUDES})
target_link_libraries(stmSources sub::drivers)
add_library(sub::sources ALIAS stmSources)

add_library(stmDelay delay.c)
target_compile_options(stmDelay PRIVATE ${C_FLAGS})
target_compile_definitions(stmDelay PRIVATE ${C_DEFS})
target_include_directories(stmDelay PUBLIC ${INTERFACES_DIR} ${CSL_INCLUDES})
add_library(sub::delay ALIAS stmDelay)

add_library(stmPin pin.c)
target_compile_options(stmPin PRIVATE ${C_FLAGS})
target_compile_definitions(stmPin PRIVATE ${C_DEFS})
target_include_directories(stmPin PUBLIC ${INTERFACES_DIR} ${CSL_INCLUDES})
add_library(sub::pin ALIAS stmPin)

add_library(stmUsart usart.c)
target_compile_options(stmUsart PRIVATE ${C_FLAGS})
target_compile_definitions(stmUsart PRIVATE ${C_DEFS})
target_include_directories(stmUsart PUBLIC ${INTERFACES_DIR} ${CSL_INCLUDES})
add_library(sub::usart ALIAS stmUsart)
