project(Startup)

set (AS_SOURCES startup_stm32f042x6.s)
set (AS_INCLUDES ${C_INCLUDES})
set (AS_FLAGS -x assembler-with-cpp ${C_FLAGS})
set (AS_DEFS ${C_DEFS})

add_library(${PROJECT_NAME} ${AS_SOURCES})
target_compile_options(${PROJECT_NAME} PRIVATE ${AS_FLAGS})
target_compile_definitions(${PROJECT_NAME} PRIVATE ${AS_DEFS})

#To create an alias to be used on the main CMAKE. 
add_library(sub::startup ALIAS ${PROJECT_NAME})
