author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 02 Feb 2010 00:43:10 +0200 | |
changeset 3 | 41300fa6a67c |
parent 0 | 1918ee327afb |
child 5 | d3bac044e0f0 |
permissions | -rw-r--r-- |
0 | 1 |
TEMPLATE = subdirs |
2 |
||
3 |
# this order is important |
|
4 |
unset(SRC_SUBDIRS) |
|
5 |
win32:SRC_SUBDIRS += src_winmain |
|
6 |
wince*:{ |
|
7 |
SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_testlib |
|
8 |
} else:symbian { |
|
9 |
SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs |
|
10 |
} else { |
|
11 |
SRC_SUBDIRS += src_corelib src_xml src_network src_gui src_sql src_testlib |
|
12 |
!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
13 |
include(tools/tools.pro) |
0 | 14 |
contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus |
15 |
} |
|
16 |
win32:SRC_SUBDIRS += src_activeqt |
|
17 |
||
18 |
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl |
|
19 |
contains(QT_CONFIG, openvg): SRC_SUBDIRS += src_openvg |
|
20 |
contains(QT_CONFIG, xmlpatterns): SRC_SUBDIRS += src_xmlpatterns |
|
21 |
contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon |
|
22 |
contains(QT_CONFIG, multimedia): SRC_SUBDIRS += src_multimedia |
|
23 |
contains(QT_CONFIG, svg): SRC_SUBDIRS += src_svg |
|
24 |
contains(QT_CONFIG, webkit) { |
|
25 |
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): SRC_SUBDIRS += src_javascriptcore |
|
26 |
SRC_SUBDIRS += src_webkit |
|
27 |
} |
|
28 |
contains(QT_CONFIG, script): SRC_SUBDIRS += src_script |
|
29 |
contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_declarative |
0 | 31 |
SRC_SUBDIRS += src_plugins |
32 |
||
33 |
src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main |
|
34 |
src_s60main.target = sub-s60main |
|
35 |
src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs |
|
36 |
src_s60installs.target = sub-s60installs |
|
37 |
src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain |
|
38 |
src_winmain.target = sub-winmain |
|
39 |
src_corelib.subdir = $$QT_SOURCE_TREE/src/corelib |
|
40 |
src_corelib.target = sub-corelib |
|
41 |
src_xml.subdir = $$QT_SOURCE_TREE/src/xml |
|
42 |
src_xml.target = sub-xml |
|
43 |
src_xmlpatterns.subdir = $$QT_SOURCE_TREE/src/xmlpatterns |
|
44 |
src_xmlpatterns.target = sub-xmlpatterns |
|
45 |
src_dbus.subdir = $$QT_SOURCE_TREE/src/dbus |
|
46 |
src_dbus.target = sub-dbus |
|
47 |
src_gui.subdir = $$QT_SOURCE_TREE/src/gui |
|
48 |
src_gui.target = sub-gui |
|
49 |
src_sql.subdir = $$QT_SOURCE_TREE/src/sql |
|
50 |
src_sql.target = sub-sql |
|
51 |
src_network.subdir = $$QT_SOURCE_TREE/src/network |
|
52 |
src_network.target = sub-network |
|
53 |
src_svg.subdir = $$QT_SOURCE_TREE/src/svg |
|
54 |
src_svg.target = sub-svg |
|
55 |
src_script.subdir = $$QT_SOURCE_TREE/src/script |
|
56 |
src_script.target = sub-script |
|
57 |
src_scripttools.subdir = $$QT_SOURCE_TREE/src/scripttools |
|
58 |
src_scripttools.target = sub-scripttools |
|
59 |
src_opengl.subdir = $$QT_SOURCE_TREE/src/opengl |
|
60 |
src_opengl.target = sub-opengl |
|
61 |
src_openvg.subdir = $$QT_SOURCE_TREE/src/openvg |
|
62 |
src_openvg.target = sub-openvg |
|
63 |
src_qt3support.subdir = $$QT_SOURCE_TREE/src/qt3support |
|
64 |
src_qt3support.target = sub-qt3support |
|
65 |
src_phonon.subdir = $$QT_SOURCE_TREE/src/phonon |
|
66 |
src_phonon.target = sub-phonon |
|
67 |
src_multimedia.subdir = $$QT_SOURCE_TREE/src/multimedia |
|
68 |
src_multimedia.target = sub-multimedia |
|
69 |
src_activeqt.subdir = $$QT_SOURCE_TREE/src/activeqt |
|
70 |
src_activeqt.target = sub-activeqt |
|
71 |
src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins |
|
72 |
src_plugins.target = sub-plugins |
|
73 |
src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib |
|
74 |
src_testlib.target = sub-testlib |
|
75 |
src_javascriptcore.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore |
|
76 |
src_javascriptcore.target = sub-javascriptcore |
|
77 |
src_webkit.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/WebCore |
|
78 |
src_webkit.target = sub-webkit |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
79 |
src_declarative.subdir = $$QT_SOURCE_TREE/src/declarative |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
80 |
src_declarative.target = sub-declarative |
0 | 81 |
|
82 |
#CONFIG += ordered |
|
83 |
!wince*:!symbian:!ordered { |
|
84 |
src_corelib.depends = src_tools_moc src_tools_rcc |
|
85 |
src_gui.depends = src_corelib src_tools_uic |
|
86 |
embedded: src_gui.depends += src_network |
|
87 |
src_xml.depends = src_corelib |
|
88 |
src_xmlpatterns.depends = src_corelib src_network |
|
89 |
src_dbus.depends = src_corelib src_xml |
|
90 |
src_svg.depends = src_xml src_gui |
|
91 |
src_script.depends = src_corelib |
|
92 |
src_scripttools.depends = src_script src_gui src_network |
|
93 |
src_network.depends = src_corelib |
|
94 |
src_opengl.depends = src_gui |
|
95 |
src_openvg.depends = src_gui |
|
96 |
src_sql.depends = src_corelib |
|
97 |
src_testlib.depends = src_corelib |
|
98 |
src_qt3support.depends = src_gui src_xml src_network src_sql |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
99 |
src_tools_idc.depends = src_corelib # target defined in tools.pro |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
100 |
src_tools_uic3.depends = src_qt3support src_xml # target defined in tools.pro |
0 | 101 |
src_phonon.depends = src_gui |
102 |
src_multimedia.depends = src_gui |
|
103 |
src_tools_activeqt.depends = src_tools_idc src_gui |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
104 |
src_declarative.depends = src_xml src_gui src_script src_network src_svg |
0 | 105 |
src_plugins.depends = src_gui src_sql src_svg |
106 |
contains(QT_CONFIG, webkit) { |
|
107 |
src_webkit.depends = src_gui src_sql src_network src_xml |
|
108 |
contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
109 |
contains(QT_CONFIG, declarative):src_declarative.depends += src_webkit |
0 | 110 |
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore |
111 |
} |
|
112 |
contains(QT_CONFIG, qt3support): src_plugins.depends += src_qt3support |
|
113 |
contains(QT_CONFIG, dbus):{ |
|
114 |
src_plugins.depends += src_dbus |
|
115 |
src_phonon.depends += src_dbus |
|
116 |
} |
|
117 |
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): src_plugins.depends += src_opengl |
|
118 |
} |
|
119 |
||
120 |
!symbian { |
|
121 |
# This creates a sub-src rule |
|
122 |
sub_src_target.CONFIG = recursive |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
123 |
sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS |
0 | 124 |
sub_src_target.target = sub-src |
125 |
sub_src_target.recurse_target = |
|
126 |
QMAKE_EXTRA_TARGETS += sub_src_target |
|
127 |
||
128 |
# This gives us a top level debug/release |
|
129 |
for(subname, SRC_SUBDIRS) { |
|
130 |
subdir = $$subname |
|
131 |
!isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir) |
|
132 |
subpro = $$subdir/$${basename(subdir)}.pro |
|
133 |
!exists($$subpro):next() |
|
134 |
subtarget = $$replace(subdir, [^A-Za-z0-9], _) |
|
135 |
reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\) |
|
136 |
subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE) |
|
137 |
subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP) |
|
138 |
subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP) |
|
139 |
SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) |
|
140 |
!isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info { |
|
141 |
#debug |
|
142 |
eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) |
|
143 |
eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)) |
|
144 |
EXTRA_DEBUG_TARGETS += debug-$${subtarget} |
|
145 |
QMAKE_EXTRA_TARGETS += debug-$${subtarget} |
|
146 |
#release |
|
147 |
eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) |
|
148 |
eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)) |
|
149 |
EXTRA_RELEASE_TARGETS += release-$${subtarget} |
|
150 |
QMAKE_EXTRA_TARGETS += release-$${subtarget} |
|
151 |
} else { #do not have a real debug target/release |
|
152 |
#debug |
|
153 |
eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) |
|
154 |
eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) |
|
155 |
EXTRA_DEBUG_TARGETS += debug-$${subtarget} |
|
156 |
QMAKE_EXTRA_TARGETS += debug-$${subtarget} |
|
157 |
#release |
|
158 |
eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) |
|
159 |
eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) |
|
160 |
EXTRA_RELEASE_TARGETS += release-$${subtarget} |
|
161 |
QMAKE_EXTRA_TARGETS += release-$${subtarget} |
|
162 |
} |
|
163 |
} |
|
164 |
debug.depends = $$EXTRA_DEBUG_TARGETS |
|
165 |
release.depends = $$EXTRA_RELEASE_TARGETS |
|
166 |
QMAKE_EXTRA_TARGETS += debug release |
|
167 |
} |
|
168 |
||
169 |
SUBDIRS += $$SRC_SUBDIRS |