FILE ( GLOB BASE_SOURCES *.c ) INCLUDE_DIRECTORIES ( . src ) FILE ( GLOB_RECURSE HW_ARM_SOURCES hw_arm/hal/*.c hw_arm/hal/*.s hw_arm/peripherals/*.c ) INCLUDE_DIRECTORIES ( hw_arm/hal hw_arm/hal/misc hw_arm/hal/libraries hw_arm/hal/libraries/cmsis/include hw_arm/hal/libraries/freertos_armcm3/include hw_arm/hal/libraries/stm32f1_fwlib/include hw_arm/peripherals) FILE ( GLOB_RECURSE MAIN_SOURCES main/*.c ) FILE ( GLOB_RECURSE COMM_SOURCES comm/*.c ) FILE ( GLOB_RECURSE ETC_SOURCES etc/*.c ) INCLUDE_DIRECTORIES ( main comm etc) ADD_EXECUTABLE ( ${PROJECT_NAME} ${BASE_SOURCES} ${HW_ARM_SOURCES} ${MAIN_SOURCES} ${PERIPH_SOURCES} ${COMM_SOURCES} ${ETC_SOURCES}) TARGET_LINK_LIBRARIES ( ${PROJECT_NAME} ${ALL_LIBRARIES} ) ARM_MAKE_BINARY ( ${PROJECT_NAME} ) ARM_ADD_LOAD_TARGET ( ${PROJECT_NAME} ) ARM_ADD_LOAD_SWD_TARGET ( ${PROJECT_NAME} ) MESSAGE ( STATUS "Available make targets: load, load_swd,dump, dbgsrv" )