3 # this order is important
5 win32:SRC_SUBDIRS += src_winmain
6 symbian:SRC_SUBDIRS += src_s60main
7 !wince*:!symbian-abld:!symbian-sbsv2:include(tools/tools.pro)
8 SRC_SUBDIRS += src_corelib
9 # TODO: Move idc to ActiveQt
11 win32:!wince*: SRC_SUBDIRS += src_tools_idc
13 SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_widgets src_printsupport src_testlib src_platformsupport
14 nacl: SRC_SUBDIRS -= src_network src_testlib
15 !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
17 contains(QT_CONFIG, no-gui): SRC_SUBDIRS -= src_gui
18 contains(QT_CONFIG, v8): SRC_SUBDIRS += src_v8
20 contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl
21 SRC_SUBDIRS += src_plugins
23 # s60installs need to be at the end, because qtbase.pro does an ordered build,
24 # and s60installs depends on all the others.
25 symbian:SRC_SUBDIRS += src_s60installs
27 src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main
28 src_s60main.target = sub-s60main
29 src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs
30 src_s60installs.target = sub-s60installs
31 src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain
32 src_winmain.target = sub-winmain
33 src_corelib.subdir = $$QT_SOURCE_TREE/src/corelib
34 src_corelib.target = sub-corelib
35 src_v8.subdir = $$QT_SOURCE_TREE/src/v8
36 src_v8.target = sub-v8
37 src_xml.subdir = $$QT_SOURCE_TREE/src/xml
38 src_xml.target = sub-xml
39 src_uitools.subdir = $$QT_SOURCE_TREE/src/uitools
40 src_uitools.target = sub-uitools
41 src_dbus.subdir = $$QT_SOURCE_TREE/src/dbus
42 src_dbus.target = sub-dbus
43 src_gui.subdir = $$QT_SOURCE_TREE/src/gui
44 src_gui.target = sub-gui
45 src_sql.subdir = $$QT_SOURCE_TREE/src/sql
46 src_sql.target = sub-sql
47 src_network.subdir = $$QT_SOURCE_TREE/src/network
48 src_network.target = sub-network
49 src_opengl.subdir = $$QT_SOURCE_TREE/src/opengl
50 src_opengl.target = sub-opengl
51 src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins
52 src_plugins.target = sub-plugins
53 src_widgets.subdir = $$QT_SOURCE_TREE/src/widgets
54 src_widgets.target = sub-widgets
55 src_printsupport.subdir = $$QT_SOURCE_TREE/src/printsupport
56 src_printsupport.target = sub-printsupport
57 src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib
58 src_testlib.target = sub-testlib
59 src_platformsupport.subdir = $$QT_SOURCE_TREE/src/platformsupport
60 src_platformsupport.target = sub-platformsupport
64 !wince*:!ordered:!symbian-abld:!symbian-sbsv2 {
65 src_corelib.depends = src_tools_moc src_tools_rcc
66 src_gui.depends = src_corelib
67 src_printsupport.depends = src_corelib src_gui src_widgets
68 src_widgets.depends = src_corelib src_gui src_tools_uic
69 embedded: src_gui.depends += src_network
70 src_xml.depends = src_corelib
71 src_uitools.depends = src_corelib src_widgets
72 src_dbus.depends = src_corelib src_xml
73 src_network.depends = src_corelib
74 src_opengl.depends = src_gui src_widgets
75 src_sql.depends = src_corelib
76 src_testlib.depends = src_corelib src_gui src_widgets
77 src_tools_idc.depends = src_corelib # target defined in tools.pro
78 src_plugins.depends = src_gui src_sql src_xml
79 qpa: src_plugins.depends = src_platformsupport
80 src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
81 src_s60installs.depends -= src_s60installs
82 contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
83 src_plugins.depends += src_opengl
84 src_declarative.depends += src_opengl
85 src_webkit.depends += src_opengl
90 # This creates a sub-src rule
91 sub_src_target.CONFIG = recursive
92 sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
93 sub_src_target.target = sub-src
94 sub_src_target.recurse_target =
95 QMAKE_EXTRA_TARGETS += sub_src_target
97 # This gives us a top level debug/release
98 for(subname, SRC_SUBDIRS) {
100 !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
101 subpro = $$subdir/$${basename(subdir)}.pro
102 !exists($$subpro):next()
103 subtarget = $$replace(subdir, [^A-Za-z0-9], _)
104 reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\)
105 subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE)
106 subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP)
107 subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP)
108 SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE))
109 !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 {
111 debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
112 debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)
113 EXTRA_DEBUG_TARGETS += debug-$${subtarget}
114 QMAKE_EXTRA_TARGETS += debug-$${subtarget}
116 release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
117 release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)
118 EXTRA_RELEASE_TARGETS += release-$${subtarget}
119 QMAKE_EXTRA_TARGETS += release-$${subtarget}
120 } else { #do not have a real debug target/release
122 debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
123 debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
124 EXTRA_DEBUG_TARGETS += debug-$${subtarget}
125 QMAKE_EXTRA_TARGETS += debug-$${subtarget}
127 release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
128 release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
129 EXTRA_RELEASE_TARGETS += release-$${subtarget}
130 QMAKE_EXTRA_TARGETS += release-$${subtarget}
133 debug.depends = $$EXTRA_DEBUG_TARGETS
134 release.depends = $$EXTRA_RELEASE_TARGETS
135 QMAKE_EXTRA_TARGETS += debug release
137 # This gives us a top-level runonphone target, which installs Qt and optionally QtWebKit.
138 contains(CONFIG, run_on_phone) {
139 src_runonphone_target.target = runonphone
140 src_runonphone_target.commands = $(MAKE) -C $$QT_BUILD_TREE/src/s60installs runonphone
141 src_runonphone_target.depends = first
142 contains(QT_CONFIG, webkit) {
143 src_runonphone_target.commands += && $(MAKE) -C $$QT_BUILD_TREE/src/3rdparty/webkit/WebCore runonphone
145 QMAKE_EXTRA_TARGETS += src_runonphone_target
148 SUBDIRS += $$SRC_SUBDIRS