# # Libuc2 common rules # # INCLUDEPATH+=$$[QT_INSTALL_PREFIX]/include/PERIPHERALS INCLUDEPATH+=$$[QT_INSTALL_PREFIX]/include defineTest(copyFiles) { files = $$1 DDIR = $$2 win32:DDIR ~= s,/,\\,g QMAKE_POST_LINK += $$QMAKE_MKDIR $$quote($$DDIR) $$escape_expand(\\n\\t) for(FILE, files) { message(copying file $$FILE) # Replace slashes in paths with backslashes for Windows win32:FILE ~= s,/,\\,g QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t) } export(QMAKE_POST_LINK) } isEmpty( UCMODEL ) { error("You didn't define any target architecture, default is stm32f4. To define a target architecture set the UCMODEL variable to the desired architecture") } contains( TEMPLATE, app ) { !isEmpty( BSP ) { BSPFILE=$$[QT_INSTALL_PREFIX]/bsp/src/$$UCMODEL/$$BSP/$$BSP".pri" message($$BSPFILE) include($$BSPFILE) }else{ error("You must set the varriable BSP with your target board name") } OBJECTS_DIR=obj-$$UCMODEL DESTDIR=bin-$$UCMODEL } !isEmpty( UCMODEL ) { include($$[QT_INSTALL_PREFIX]/src/$$UCMODEL/qmake/cpu.pri) include($$[QT_INSTALL_PREFIX]/src/$$UCMODEL/qmake/qmake.conf) }