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