| 1 | # With DEF files enabled, removed exported symbols are treated as errors
|
|---|
| 2 | # and there is binary compatibility between successive builds.
|
|---|
| 3 |
|
|---|
| 4 | CONFIG -= def_files_disabled
|
|---|
| 5 |
|
|---|
| 6 | # We need a target name without the INFIX'ed part, since DEF files are not infixed.
|
|---|
| 7 | equals(QMAKE_TARGET_PRODUCT, Qt4)|equals(QMAKE_TARGET_PRODUCT, QTestLib):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "")
|
|---|
| 8 | else:clean_TARGET = $$TARGET
|
|---|
| 9 |
|
|---|
| 10 | symbian-abld|symbian-sbsv2 {
|
|---|
| 11 | # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
|
|---|
| 12 | # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
|
|---|
| 13 | # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
|
|---|
| 14 | # Similarly, explicit EXPORTUNFROZEN should block adding defBlock
|
|---|
| 15 | !contains(MMP_RULES, defBlock):!contains(MMP_RULES, EXPORTUNFROZEN) {
|
|---|
| 16 | # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
|
|---|
| 17 | # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
|
|---|
| 18 | # statements - they use the qmake generated statements instead
|
|---|
| 19 | # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
|
|---|
| 20 | !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
|
|---|
| 21 | !isEmpty(DEF_FILE) {
|
|---|
| 22 | defBlock = \
|
|---|
| 23 | "$${LITERAL_HASH}ifdef WINSCW" \
|
|---|
| 24 | "DEFFILE $$DEF_FILE/bwins/$${clean_TARGET}.def" \
|
|---|
| 25 | "$${LITERAL_HASH}elif defined EABI" \
|
|---|
| 26 | "DEFFILE $$DEF_FILE/eabi/$${clean_TARGET}.def" \
|
|---|
| 27 | "$${LITERAL_HASH}endif"
|
|---|
| 28 | } else:!isEmpty(defFilePath) {
|
|---|
| 29 | defBlock = \
|
|---|
| 30 | "$${LITERAL_HASH}ifdef WINSCW" \
|
|---|
| 31 | "DEFFILE $$defFilePath/bwins/$${clean_TARGET}.def" \
|
|---|
| 32 | "$${LITERAL_HASH}elif defined EABI" \
|
|---|
| 33 | "DEFFILE $$defFilePath/eabi/$${clean_TARGET}.def" \
|
|---|
| 34 | "$${LITERAL_HASH}endif"
|
|---|
| 35 | } else {
|
|---|
| 36 | # If defFilePath is not defined, then put the folders containing the DEF files at the
|
|---|
| 37 | # same level as the .pro (and generated MMP) file(s)
|
|---|
| 38 | defBlock = \
|
|---|
| 39 | "$${LITERAL_HASH}ifdef WINSCW" \
|
|---|
| 40 | "DEFFILE ./bwins/$${clean_TARGET}.def" \
|
|---|
| 41 | "$${LITERAL_HASH}elif defined EABI" \
|
|---|
| 42 | "DEFFILE ./eabi/$${clean_TARGET}.def" \
|
|---|
| 43 | "$${LITERAL_HASH}endif"
|
|---|
| 44 | }
|
|---|
| 45 | MMP_RULES += defBlock
|
|---|
| 46 | }
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | } else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib):!contains(CONFIG, plugin) {
|
|---|
| 50 | !isEmpty(DEF_FILE) {
|
|---|
| 51 | defFile = $$DEF_FILE
|
|---|
| 52 | } else {
|
|---|
| 53 | defFile = .
|
|---|
| 54 | }
|
|---|
| 55 | system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") {
|
|---|
| 56 | !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") {
|
|---|
| 57 | system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi")
|
|---|
| 58 | }
|
|---|
| 59 | elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(clean_TARGET)u.def
|
|---|
| 60 | } else {
|
|---|
| 61 | elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile
|
|---|
| 62 | }
|
|---|
| 63 | QMAKE_ELF2E32_FLAGS += "--definput=$$elf2e32FileToAdd"
|
|---|
| 64 |
|
|---|
| 65 | symbianObjdir = $$OBJECTS_DIR
|
|---|
| 66 | isEmpty(symbianObjdir):symbianObjdir = .
|
|---|
| 67 |
|
|---|
| 68 | freeze_target.target = freeze
|
|---|
| 69 | freeze_target.depends = first
|
|---|
| 70 | # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do.
|
|---|
| 71 | freeze_target.commands = $$QMAKE_COPY $$symbianObjdir/$${TARGET}.def $$elf2e32FileToAdd
|
|---|
| 72 | QMAKE_EXTRA_TARGETS += freeze_target
|
|---|
| 73 | } else:contains(TEMPLATE, subdirs) {
|
|---|
| 74 | freeze_target.target = freeze
|
|---|
| 75 | freeze_target.CONFIG = recursive
|
|---|
| 76 | freeze_target.recurse = $$SUBDIRS
|
|---|
| 77 | QMAKE_EXTRA_TARGETS += freeze_target
|
|---|
| 78 | } else {
|
|---|
| 79 | freeze_target.target = freeze
|
|---|
| 80 | freeze_target.commands =
|
|---|
| 81 | QMAKE_EXTRA_TARGETS += freeze_target
|
|---|
| 82 | }
|
|---|