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