lower qmake optimization level on msvc
[profile/ivi/qtbase.git] / qtbase.pro
1 #####################################################################
2 # Main projectfile
3 #####################################################################
4
5 CONFIG += ordered
6 TEMPLATE = subdirs
7
8 cross_compile: CONFIG += nostrip
9
10 module_qtbase_tests.subdir = tests
11 module_qtbase_tests.target = module-qtbase-tests
12 module_qtbase_tests.depends = module_qtbase_src
13 module_qtbase_tests.CONFIG = no_default_install
14
15 #process the projects
16 PROJECTS=$$eval($$list($$lower($$unique(QT_BUILD_PARTS))))
17 # note that the order matters for these blocks!
18 contains(PROJECTS, qmake) {
19     PROJECTS -= qmake
20     # nothing to be done
21 }
22 contains(PROJECTS, libs) {
23     PROJECTS -= libs
24     include(src/src.pro)
25 }
26 contains(PROJECTS, examples) {
27     PROJECTS -= examples
28     SUBDIRS += examples
29 }
30 contains(PROJECTS, tests) {
31     PROJECTS -= tests
32     SUBDIRS += module_qtbase_tests
33 }
34 !isEmpty(PROJECTS) {
35     message(Unknown PROJECTS: $$PROJECTS)
36 }
37
38 confclean.depends += clean
39 confclean.commands =
40 unix {
41   confclean.commands += (cd config.tests/unix/stl && $(MAKE) distclean); \
42                         (cd config.tests/unix/endian && $(MAKE) distclean); \
43                         (cd config.tests/unix/ipv6 && $(MAKE) distclean); \
44                         (cd config.tests/unix/largefile && $(MAKE) distclean); \
45                         (cd config.tests/unix/ptrsize && $(MAKE) distclean); \
46                         (cd config.tests/x11/notype && $(MAKE) distclean); \
47                         (cd config.tests/unix/getaddrinfo && $(MAKE) distclean); \
48                         (cd config.tests/unix/cups && $(MAKE) distclean); \
49                         (cd config.tests/unix/psql && $(MAKE) distclean); \
50                         (cd config.tests/unix/mysql && $(MAKE) distclean); \
51                         (cd config.tests/unix/mysql_r && $(MAKE) distclean); \
52                         (cd config.tests/unix/nis && $(MAKE) distclean); \
53                         (cd config.tests/unix/nix && $(MAKE) distclean); \
54                         (cd config.tests/unix/iodbc && $(MAKE) distclean); \
55                         (cd config.tests/unix/odbc && $(MAKE) distclean); \
56                         (cd config.tests/unix/oci && $(MAKE) distclean); \
57                         (cd config.tests/unix/tds && $(MAKE) distclean); \
58                         (cd config.tests/unix/db2 && $(MAKE) distclean); \
59                         (cd config.tests/unix/ibase && $(MAKE) distclean); \
60                         (cd config.tests/unix/ipv6ifname && $(MAKE) distclean); \
61                         (cd config.tests/unix/zlib && $(MAKE) distclean); \
62                         (cd config.tests/unix/sqlite2 && $(MAKE) distclean); \
63                         (cd config.tests/unix/libjpeg && $(MAKE) distclean); \
64                         (cd config.tests/unix/libpng && $(MAKE) distclean); \
65                         (cd config.tests/x11/xcursor && $(MAKE) distclean); \
66                         (cd config.tests/x11/xrender && $(MAKE) distclean); \
67                         (cd config.tests/x11/xrandr && $(MAKE) distclean); \
68                         (cd config.tests/x11/xkb && $(MAKE) distclean); \
69                         (cd config.tests/x11/xinput && $(MAKE) distclean); \
70                         (cd config.tests/x11/fontconfig && $(MAKE) distclean); \
71                         (cd config.tests/x11/xinerama && $(MAKE) distclean); \
72                         (cd config.tests/x11/sm && $(MAKE) distclean); \
73                         (cd config.tests/x11/xshape && $(MAKE) distclean); \
74                         (cd config.tests/x11/opengl && $(MAKE) distclean); \
75                         $(DEL_FILE) config.tests/.qmake.cache; \
76                         $(DEL_FILE) src/corelib/global/qconfig.h; \
77                         $(DEL_FILE) src/corelib/global/qconfig.cpp; \
78                         $(DEL_FILE) mkspecs/qconfig.pri; \
79                         $(DEL_FILE) mkspecs/qmodule.pri; \
80                         $(DEL_FILE) .qmake.cache; \
81                         (cd qmake && $(MAKE) distclean);
82 }
83 win32 {
84   confclean.commands += -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \
85                         -$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
86                         -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
87                         -$(DEL_FILE) mkspecs\\qmodule.pri $$escape_expand(\\n\\t) \
88                         -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
89                         (cd qmake && $(MAKE) distclean)
90 }
91 QMAKE_EXTRA_TARGETS += confclean
92 qmakeclean.commands += (cd qmake && $(MAKE) clean)
93 QMAKE_EXTRA_TARGETS += qmakeclean
94 CLEAN_DEPS += qmakeclean
95
96 CONFIG -= qt
97
98 ### installations ####
99
100 #qmake
101 qmake.path=$$[QT_INSTALL_BINS]
102 win32 {
103    qmake.files=$$QT_BUILD_TREE/bin/qmake.exe
104 } else {
105    qmake.files=$$QT_BUILD_TREE/bin/qmake
106 }
107 INSTALLS += qmake
108
109 #syncqt
110 syncqt.path=$$[QT_INSTALL_BINS]
111 syncqt.files=$$QT_BUILD_TREE/bin/syncqt
112 win32:syncqt.files=$$QT_BUILD_TREE/bin/syncqt.bat
113 INSTALLS += syncqt
114
115 #qtmodule-configtests
116 configtests.path=$$[QT_INSTALL_BINS]
117 configtests.files=$$QT_BUILD_TREE/bin/qtmodule-configtests
118 INSTALLS += configtests
119
120 #mkspecs
121 mkspecs.path=$$[QT_INSTALL_DATA]/mkspecs
122 mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$QT_BUILD_TREE/mkspecs/qmodule.pri $$files($$QT_SOURCE_TREE/mkspecs/*)
123 mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules
124 unix { 
125    DEFAULT_QMAKESPEC = $$QMAKESPEC
126    DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
127    mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
128    mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/default
129 }
130 win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) {
131     # When shadow building on Windows, the default mkspec only exists in the build tree.
132     mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
133 }
134 INSTALLS += mkspecs
135
136 OTHER_FILES += \
137     configure \
138     header.BSD \
139     header.FDL \
140     header.LGPL \
141     header.LGPL-ONLY \
142     sync.profile