33 } |
33 } |
34 symbianDestdir=$$DESTDIR |
34 symbianDestdir=$$DESTDIR |
35 isEmpty(symbianDestdir) { |
35 isEmpty(symbianDestdir) { |
36 symbianDestdir = . |
36 symbianDestdir = . |
37 } |
37 } |
38 baseTarget = $$basename(TARGET) |
38 baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) |
39 !equals(TARGET, "$$baseTarget"):symbianDestdir = $$symbianDestdir/$$dirname(TARGET) |
39 !equals(TARGET, "$$baseTarget"):symbianDestdir = $$symbianDestdir/$$dirname(TARGET) |
40 |
40 |
41 contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { |
41 contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { |
42 DEFINES += __MARM_THUMB__ |
42 DEFINES += __MARM_THUMB__ |
43 } |
43 } |
44 |
44 |
45 defineReplace(processSymbianLibraries) { |
45 defineReplace(processSymbianLibrary) { |
46 library = $$replace(1, "\\.dll$", ".dso") |
46 qt_library = $$replace(1, "\\.dll$", ".dso") |
47 library = $$replace(library, "^-l", "") |
47 qt_library = $$replace(qt_library, "^-l", "") |
48 isFullName = $$find(library, \\.) |
48 isFullName = $$find(qt_library, \\.) |
49 isEmpty(isFullName):library="$${library}.dso" |
49 isEmpty(isFullName):qt_library="$${qt_library}.dso" |
50 linux-gcce { |
50 return($$qt_library) |
51 newLIB = "-l:$${library}" |
51 } |
52 } else { |
52 |
53 newLIB = "$${library}" |
53 qt_libraries = $$split(LIBS, " ") |
54 } |
54 LIBS = |
55 contains(library, "\\.dso$")|contains(library, "\\.lib$"):PRE_TARGETDEPS += $$library |
55 for(qt_library, qt_libraries) { |
56 return($$newLIB) |
56 qt_newLib = $$processSymbianLibrary($$qt_library) |
57 } |
57 contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib |
58 |
58 linux-gcce:qt_newLib = "-l:$$qt_newLib" |
59 for(libraries, LIBS) { |
59 LIBS += $$qt_newLib |
60 newLIBS += $$processSymbianLibraries($$libraries) |
60 } |
61 } |
61 |
62 LIBS = $$newLIBS |
62 qt_libraries = $$split(QMAKE_LIBS, " ") |
63 newLIBS = |
63 QMAKE_LIBS = |
64 for(libraries, QMAKE_LIBS) { |
64 for(qt_library, qt_libraries) { |
65 newLIBS += $$processSymbianLibraries($$libraries) |
65 qt_newLib = $$processSymbianLibrary($$qt_library) |
66 } |
66 contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib |
67 QMAKE_LIBS = $$newLIBS |
67 linux-gcce:qt_newLib = "-l:$$qt_newLib" |
|
68 QMAKE_LIBS += $$qt_newLib |
|
69 } |
68 |
70 |
69 elf2e32_LIBPATH = |
71 elf2e32_LIBPATH = |
70 for(libPath, QMAKE_LIBDIR) { |
72 for(libPath, QMAKE_LIBDIR) { |
71 elf2e32_LIBPATH += "--libpath=$$libPath" |
73 elf2e32_LIBPATH += "--libpath=$$libPath" |
72 } |
74 } |
110 capability = $$replace(capability, "\\+-", "-") |
112 capability = $$replace(capability, "\\+-", "-") |
111 isEmpty(capability): capability = "None" |
113 isEmpty(capability): capability = "None" |
112 capability = "--capability=$$capability" |
114 capability = "--capability=$$capability" |
113 |
115 |
114 contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { |
116 contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { |
115 !isEmpty(QMAKE_POST_LINK) { |
|
116 # No way to honor the '@' :-( |
|
117 QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") |
|
118 QMAKE_POST_LINK = && $$QMAKE_POST_LINK |
|
119 } |
|
120 |
|
121 contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def |
117 contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def |
122 |
118 |
|
119 !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK |
123 QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym \ |
120 QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym \ |
124 && $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \ |
121 && $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \ |
125 --sid=$$TARGET.SID \ |
122 --sid=$$TARGET.SID \ |
126 --uid1=0x10000079 \ |
123 --uid1=0x10000079 \ |
127 --uid2=$$TARGET.UID2 \ |
124 --uid2=$$TARGET.UID2 \ |
258 symbianresources.CONFIG = no_link target_predeps |
251 symbianresources.CONFIG = no_link target_predeps |
259 |
252 |
260 QMAKE_EXTRA_COMPILERS += symbianresources |
253 QMAKE_EXTRA_COMPILERS += symbianresources |
261 |
254 |
262 contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { |
255 contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { |
263 baseResourceTarget = $$basename(TARGET) |
|
264 # If you change this, also see application_icon.prf |
|
265 baseResourceTarget = $$replace(baseResourceTarget, " ",_) |
|
266 |
|
267 # Make our own extra target in order to get dependencies for generated |
256 # Make our own extra target in order to get dependencies for generated |
268 # files right. This also avoids the warning about files not found. |
257 # files right. This also avoids the warning about files not found. |
269 symbianGenResource.target = $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg |
258 symbianGenResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg |
270 symbianGenResource.commands = cpp -nostdinc -undef \ |
259 symbianGenResource.commands = cpp -nostdinc -undef \ |
271 $$symbian_resources_INCLUDES \ |
260 $$symbian_resources_INCLUDES \ |
272 $$symbian_resources_DEFINES \ |
261 $$symbian_resources_DEFINES \ |
273 $${baseResourceTarget}.rss \ |
262 $${baseTarget}.rss \ |
274 -o $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rpp \ |
263 -o $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \ |
275 && rcomp -u -m045,046,047 \ |
264 && rcomp -u -m045,046,047 \ |
276 -s$${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rpp \ |
265 -s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \ |
277 -o$${symbianDestdir}/$${baseResourceTarget}.rsc \ |
266 -o$${symbianDestdir}/$${baseTarget}.rsc \ |
278 -h$${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg \ |
267 -h$${symbian_resources_RCC_DIR}/$${baseTarget}.rsg \ |
279 -i$${baseResourceTarget}.rss |
268 -i$${baseTarget}.rss |
280 silent:symbianGenResource.commands = @echo rcomp $${baseResourceTarget}.rss && $$symbianGenResource.commands |
269 silent:symbianGenResource.commands = @echo rcomp $${baseTarget}.rss && $$symbianGenResource.commands |
281 symbianGenResource.depends = $${baseResourceTarget}.rss |
270 symbianGenResource.depends = $${baseTarget}.rss |
282 PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg |
271 PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg |
283 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg |
272 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg |
284 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rpp |
273 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp |
285 QMAKE_DISTCLEAN += $${baseResourceTarget}.rss |
274 QMAKE_DISTCLEAN += $${baseTarget}.rss |
286 QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseResourceTarget}.rsc |
275 QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.rsc |
287 |
276 |
288 symbianGenRegResource.target = $${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rsg |
277 symbianGenRegResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg |
289 symbianGenRegResource.commands = cpp -nostdinc -undef \ |
278 symbianGenRegResource.commands = cpp -nostdinc -undef \ |
290 $$symbian_resources_INCLUDES \ |
279 $$symbian_resources_INCLUDES \ |
291 $$symbian_resources_DEFINES \ |
280 $$symbian_resources_DEFINES \ |
292 $${baseResourceTarget}_reg.rss \ |
281 $${baseTarget}_reg.rss \ |
293 -o $${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rpp \ |
282 -o $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \ |
294 && rcomp -u -m045,046,047 \ |
283 && rcomp -u -m045,046,047 \ |
295 -s$${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rpp \ |
284 -s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \ |
296 -o$${symbianDestdir}/$${baseResourceTarget}_reg.rsc \ |
285 -o$${symbianDestdir}/$${baseTarget}_reg.rsc \ |
297 -h$${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rsg \ |
286 -h$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg \ |
298 -i$${baseResourceTarget}_reg.rss |
287 -i$${baseTarget}_reg.rss |
299 silent:symbianGenRegResource.commands = @echo rcomp $${baseResourceTarget}_reg.rss && $$symbianGenRegResource.commands |
288 silent:symbianGenRegResource.commands = @echo rcomp $${baseTarget}_reg.rss && $$symbianGenRegResource.commands |
300 symbianGenRegResource.depends = $${baseResourceTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg |
289 symbianGenRegResource.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg |
301 PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rsg |
290 PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg |
302 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rsg |
291 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg |
303 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rpp |
292 QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp |
304 QMAKE_DISTCLEAN += $${baseResourceTarget}_reg.rss |
293 QMAKE_DISTCLEAN += $${baseTarget}_reg.rss |
305 QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseResourceTarget}_reg.rsc |
294 QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}_reg.rsc |
306 |
295 |
307 # Trick to get qmake to create the RCC_DIR for us. |
296 # Trick to get qmake to create the RCC_DIR for us. |
308 symbianRccDirCreation.input = SOURCES |
297 symbianRccDirCreation.input = SOURCES |
309 symbianRccDirCreation.commands = |
298 symbianRccDirCreation.commands = |
310 symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy |
299 symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy |