3 # this order is important
5 win32:SRC_SUBDIRS += src_winmain
6 symbian:SRC_SUBDIRS += src_s60main
7 SRC_SUBDIRS += src_corelib src_network src_sql src_testlib src_xml src_uitools
8 nacl: SRC_SUBDIRS -= src_network src_testlib
9 !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
10 !contains(QT_CONFIG, no-gui): SRC_SUBDIRS += src_gui
12 !wince*:!symbian-abld:!symbian-sbsv2:include(tools/tools.pro)
14 contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl
15 contains(QT_CONFIG, openvg): SRC_SUBDIRS += src_openvg
16 SRC_SUBDIRS += src_plugins
18 # s60installs need to be at the end, because qtbase.pro does an ordered build,
19 # and s60installs depends on all the others.
20 symbian:SRC_SUBDIRS += src_s60installs
22 src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main
23 src_s60main.target = sub-s60main
24 src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs
25 src_s60installs.target = sub-s60installs
26 src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain
27 src_winmain.target = sub-winmain
28 src_corelib.subdir = $$QT_SOURCE_TREE/src/corelib
29 src_corelib.target = sub-corelib
30 src_xml.subdir = $$QT_SOURCE_TREE/src/xml
31 src_xml.target = sub-xml
32 src_uitools.subdir = $$QT_SOURCE_TREE/src/uitools
33 src_uitools.target = sub-uitools
34 src_dbus.subdir = $$QT_SOURCE_TREE/src/dbus
35 src_dbus.target = sub-dbus
36 src_gui.subdir = $$QT_SOURCE_TREE/src/gui
37 src_gui.target = sub-gui
38 src_sql.subdir = $$QT_SOURCE_TREE/src/sql
39 src_sql.target = sub-sql
40 src_network.subdir = $$QT_SOURCE_TREE/src/network
41 src_network.target = sub-network
42 src_opengl.subdir = $$QT_SOURCE_TREE/src/opengl
43 src_opengl.target = sub-opengl
44 src_openvg.subdir = $$QT_SOURCE_TREE/src/openvg
45 src_openvg.target = sub-openvg
46 src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins
47 src_plugins.target = sub-plugins
48 src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib
49 src_testlib.target = sub-testlib
52 !wince*:!ordered:!symbian-abld:!symbian-sbsv2 {
53 src_corelib.depends = src_tools_moc src_tools_rcc
54 src_gui.depends = src_corelib src_tools_uic
55 embedded: src_gui.depends += src_network
56 src_xml.depends = src_corelib
57 src_uitools.depends = src_corelib src_xml
58 src_dbus.depends = src_corelib src_xml
59 src_network.depends = src_corelib
60 src_opengl.depends = src_gui
61 src_openvg.depends = src_gui
62 src_sql.depends = src_corelib
63 src_testlib.depends = src_corelib
64 src_tools_idc.depends = src_corelib # target defined in tools.pro
65 src_tools_uic3.depends = src_qt3support src_xml # target defined in tools.pro
66 src_plugins.depends = src_gui src_sql src_xml
67 src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
68 src_s60installs.depends -= src_s60installs
69 contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
70 src_plugins.depends += src_opengl
71 src_declarative.depends += src_opengl
72 src_webkit.depends += src_opengl
77 # This creates a sub-src rule
78 sub_src_target.CONFIG = recursive
79 sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
80 sub_src_target.target = sub-src
81 sub_src_target.recurse_target =
82 QMAKE_EXTRA_TARGETS += sub_src_target
84 # This gives us a top level debug/release
85 for(subname, SRC_SUBDIRS) {
87 !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
88 subpro = $$subdir/$${basename(subdir)}.pro
89 !exists($$subpro):next()
90 subtarget = $$replace(subdir, [^A-Za-z0-9], _)
91 reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\)
92 subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE)
93 subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP)
94 subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP)
95 SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE))
96 !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 {
98 debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
99 debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)
100 EXTRA_DEBUG_TARGETS += debug-$${subtarget}
101 QMAKE_EXTRA_TARGETS += debug-$${subtarget}
103 release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
104 release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)
105 EXTRA_RELEASE_TARGETS += release-$${subtarget}
106 QMAKE_EXTRA_TARGETS += release-$${subtarget}
107 } else { #do not have a real debug target/release
109 debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
110 debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
111 EXTRA_DEBUG_TARGETS += debug-$${subtarget}
112 QMAKE_EXTRA_TARGETS += debug-$${subtarget}
114 release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
115 release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
116 EXTRA_RELEASE_TARGETS += release-$${subtarget}
117 QMAKE_EXTRA_TARGETS += release-$${subtarget}
120 debug.depends = $$EXTRA_DEBUG_TARGETS
121 release.depends = $$EXTRA_RELEASE_TARGETS
122 QMAKE_EXTRA_TARGETS += debug release
124 # This gives us a top-level runonphone target, which installs Qt and optionally QtWebKit.
125 contains(CONFIG, run_on_phone) {
126 src_runonphone_target.target = runonphone
127 src_runonphone_target.commands = $(MAKE) -C $$QT_BUILD_TREE/src/s60installs runonphone
128 src_runonphone_target.depends = first
129 contains(QT_CONFIG, webkit) {
130 src_runonphone_target.commands += && $(MAKE) -C $$QT_BUILD_TREE/src/3rdparty/webkit/WebCore runonphone
132 QMAKE_EXTRA_TARGETS += src_runonphone_target
135 SUBDIRS += $$SRC_SUBDIRS