libuc2.prf
98 lines
| 2.4 KiB
| application/pics-rules
|
TextLexer
r47 | # | |||
# Libuc2 common rules | ||||
# | ||||
# | ||||
r71 | 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) | ||||
} | ||||
INCLUDEPATH += $$[QT_INSTALL_HEADERS] \ | ||||
r72 | $$[QT_INSTALL_HEADERS]/FS \ | |||
$$[QT_INSTALL_HEADERS]/EEPROMS \ | ||||
$$[QT_INSTALL_HEADERS]/AUDIO \ | ||||
$$[QT_INSTALL_HEADERS]/POWER \ | ||||
$$[QT_INSTALL_HEADERS]/PERIPHERALS \ | ||||
r94 | $$[QT_INSTALL_HEADERS]/USB \ | |||
r72 | $$[QT_INSTALL_HEADERS]/FLASH \ | |||
$$[QT_INSTALL_HEADERS]/ADC \ | ||||
r71 | $$[QT_INSTALL_HEADERS]/GRAPHIC/CONTROLERS \ | |||
$$[QT_INSTALL_HEADERS]/GRAPHIC/TC_CONTROLERS \ | ||||
r79 | $$[QT_INSTALL_HEADERS]/GRAPHIC/GUI \ | |||
r72 | $$[QT_INSTALL_HEADERS]/GRAPHIC/GUI/FONTS \ | |||
$$[QT_INSTALL_HEADERS]/GRAPHIC/GUI/Widgets | ||||
r71 | ||||
r74 | isEmpty( UCMODEL ) { | |||
message("You didn't define any target architecture, default is stm32f4") | ||||
message("To define a target architecture set the UCMODEL variable to the desired architecture") | ||||
#UCMODEL=stm32f4 | ||||
} | ||||
r71 | contains( TEMPLATE, app ) { | |||
!isEmpty( BSP ) { | ||||
include(./boards/$$BSP/bsp.pri) | ||||
} | ||||
r74 | INCLUDEPATH+= $$[QT_INSTALL_PREFIX]/bsp/src/$$UCMODEL/$$BSP | |||
r71 | CONFIG += link_prl | |||
OBJECTS_DIR=obj-$$UCMODEL | ||||
DESTDIR=bin-$$UCMODEL | ||||
} | ||||
!isEmpty( UCMODEL ) { | ||||
include(./$$UCMODEL/cpu.pri) | ||||
include(./$$UCMODEL/qmake.conf) | ||||
} | ||||
!isEmpty(FILESTOCOPY.files) { | ||||
copyFiles($$FILESTOCOPY.files,$$FILESTOCOPY.path) | ||||
} | ||||
r47 | contains( TEMPLATE, lib ) { | |||
r71 | ||||
CONFIG+=staticlib | ||||
OBJECTS_DIR=obj-$$UCMODEL | ||||
contains( CONFIG, libuc2lib) { | ||||
CONFIG += create_prl | ||||
DESTDIR=$$[QT_INSTALL_LIBS]/$$UCMODEL | ||||
r47 | }else{ | |||
r71 | contains( CONFIG, bsp) { | |||
DESTDIR=$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP | ||||
CONFIG += create_prl | ||||
!isEmpty( BSPFILE ) { | ||||
#bspFileCopy.target = bspFileCopy | ||||
#bspFileCopy.commands = echo hello | ||||
#QMAKE_EXTRA_TARGETS += bspFileCopy | ||||
#target.depend += bspFileCopy | ||||
#PRE_TARGETDEPS += bspFileCopy | ||||
copyFiles($$BSPFILE,$$[QT_INSTALL_PREFIX]/mkspecs/features/boards/$$BSP) | ||||
} | ||||
}else{ | ||||
DESTDIR=bin-$$UCMODEL | ||||
} | ||||
r47 | } | |||
} | ||||