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 SRC_SUBDIRS += src_network src_sql src_gui src_xml src_widgets src_printsupport src_testlib src_platformsupport
10 nacl: SRC_SUBDIRS -= src_network src_testlib
11 !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
13 contains(QT_CONFIG, no-gui): SRC_SUBDIRS -= src_gui
14 contains(QT_CONFIG, v8): SRC_SUBDIRS += src_v8
16 contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl
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_dbus.subdir = $$QT_SOURCE_TREE/src/dbus
36 src_dbus.target = sub-dbus
37 src_gui.subdir = $$QT_SOURCE_TREE/src/gui
38 src_gui.target = sub-gui
39 src_sql.subdir = $$QT_SOURCE_TREE/src/sql
40 src_sql.target = sub-sql
41 src_network.subdir = $$QT_SOURCE_TREE/src/network
42 src_network.target = sub-network
43 src_opengl.subdir = $$QT_SOURCE_TREE/src/opengl
44 src_opengl.target = sub-opengl
45 src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins
46 src_plugins.target = sub-plugins
47 src_widgets.subdir = $$QT_SOURCE_TREE/src/widgets
48 src_widgets.target = sub-widgets
49 src_printsupport.subdir = $$QT_SOURCE_TREE/src/printsupport
50 src_printsupport.target = sub-printsupport
51 src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib
52 src_testlib.target = sub-testlib
53 src_platformsupport.subdir = $$QT_SOURCE_TREE/src/platformsupport
54 src_platformsupport.target = sub-platformsupport
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_printsupport.depends = src_corelib src_gui src_widgets
62 src_widgets.depends = src_corelib src_gui src_tools_uic
63 src_xml.depends = src_corelib
64 src_dbus.depends = src_corelib src_xml
65 src_network.depends = src_corelib
66 src_opengl.depends = src_gui src_widgets
67 src_sql.depends = src_corelib
68 src_testlib.depends = src_corelib src_gui src_widgets
69 src_plugins.depends = src_gui src_sql src_xml
70 qpa: src_plugins.depends = src_platformsupport
71 contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
72 src_plugins.depends += src_opengl
73 src_declarative.depends += src_opengl
74 src_webkit.depends += src_opengl
79 # This creates a sub-src rule
80 sub_src_target.CONFIG = recursive
81 sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
82 sub_src_target.target = sub-src
83 sub_src_target.recurse_target =
84 QMAKE_EXTRA_TARGETS += sub_src_target
86 # This gives us a top level debug/release
87 for(subname, SRC_SUBDIRS) {
89 !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
90 subpro = $$subdir/$${basename(subdir)}.pro
91 !exists($$subpro):next()
92 subtarget = $$replace(subdir, [^A-Za-z0-9], _)
93 reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\)
94 subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE)
95 subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP)
96 subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP)
97 SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE))
98 !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs)):!separate_debug_info {
100 debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
101 debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)
102 EXTRA_DEBUG_TARGETS += debug-$${subtarget}
103 QMAKE_EXTRA_TARGETS += debug-$${subtarget}
105 release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
106 release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)
107 EXTRA_RELEASE_TARGETS += release-$${subtarget}
108 QMAKE_EXTRA_TARGETS += release-$${subtarget}
109 } else { #do not have a real debug target/release
111 debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
112 debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
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) first)
118 EXTRA_RELEASE_TARGETS += release-$${subtarget}
119 QMAKE_EXTRA_TARGETS += release-$${subtarget}
122 debug.depends = $$EXTRA_DEBUG_TARGETS
123 release.depends = $$EXTRA_RELEASE_TARGETS
124 QMAKE_EXTRA_TARGETS += debug release
126 SUBDIRS += $$SRC_SUBDIRS