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