Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
[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 #process the projects
11 for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) {
12     isEqual(PROJECT, examples) {
13        SUBDIRS += examples
14     } else:isEqual(PROJECT, demos) {
15        SUBDIRS += demos
16     } else:isEqual(PROJECT, libs) {
17        include(src/src.pro)
18     } else:isEqual(PROJECT, qmake) {
19 #      SUBDIRS += qmake
20     } else {
21        message(Unknown PROJECT: $$PROJECT)
22     }
23 }
24
25 module_qtbase_tests.subdir = tests
26 module_qtbase_tests.target = module-qtbase-tests
27 module_qtbase_tests.depends = module_qtbase_src
28 module_qtbase_tests.CONFIG = no_default_target no_default_install
29 SUBDIRS += module_qtbase_tests
30
31 !symbian: confclean.depends += clean
32 confclean.commands =
33 unix:!symbian {
34   confclean.commands += (cd config.tests/unix/stl && $(MAKE) distclean); \
35                         (cd config.tests/unix/endian && $(MAKE) distclean); \
36                         (cd config.tests/unix/ipv6 && $(MAKE) distclean); \
37                         (cd config.tests/unix/largefile && $(MAKE) distclean); \
38                         (cd config.tests/unix/ptrsize && $(MAKE) distclean); \
39                         (cd config.tests/x11/notype && $(MAKE) distclean); \
40                         (cd config.tests/unix/getaddrinfo && $(MAKE) distclean); \
41                         (cd config.tests/unix/cups && $(MAKE) distclean); \
42                         (cd config.tests/unix/psql && $(MAKE) distclean); \
43                         (cd config.tests/unix/mysql && $(MAKE) distclean); \
44                         (cd config.tests/unix/mysql_r && $(MAKE) distclean); \
45                         (cd config.tests/unix/nis && $(MAKE) distclean); \
46                         (cd config.tests/unix/nix && $(MAKE) distclean); \
47                         (cd config.tests/unix/iodbc && $(MAKE) distclean); \
48                         (cd config.tests/unix/odbc && $(MAKE) distclean); \
49                         (cd config.tests/unix/oci && $(MAKE) distclean); \
50                         (cd config.tests/unix/tds && $(MAKE) distclean); \
51                         (cd config.tests/unix/db2 && $(MAKE) distclean); \
52                         (cd config.tests/unix/ibase && $(MAKE) distclean); \
53                         (cd config.tests/unix/ipv6ifname && $(MAKE) distclean); \
54                         (cd config.tests/unix/zlib && $(MAKE) distclean); \
55                         (cd config.tests/unix/libmng && $(MAKE) distclean); \
56                         (cd config.tests/unix/sqlite2 && $(MAKE) distclean); \
57                         (cd config.tests/unix/libjpeg && $(MAKE) distclean); \
58                         (cd config.tests/unix/libpng && $(MAKE) distclean); \
59                         (cd config.tests/x11/xcursor && $(MAKE) distclean); \
60                         (cd config.tests/x11/xrender && $(MAKE) distclean); \
61                         (cd config.tests/x11/xrandr && $(MAKE) distclean); \
62                         (cd config.tests/x11/xkb && $(MAKE) distclean); \
63                         (cd config.tests/x11/xinput && $(MAKE) distclean); \
64                         (cd config.tests/x11/fontconfig && $(MAKE) distclean); \
65                         (cd config.tests/x11/xinerama && $(MAKE) distclean); \
66                         (cd config.tests/x11/sm && $(MAKE) distclean); \
67                         (cd config.tests/x11/xshape && $(MAKE) distclean); \
68                         (cd config.tests/x11/opengl && $(MAKE) distclean); \
69                         $(DEL_FILE) config.tests/.qmake.cache; \
70                         $(DEL_FILE) src/core/global/qconfig.h; \
71                         $(DEL_FILE) src/core/global/qconfig.cpp; \
72                         $(DEL_FILE) mkspecs/qconfig.pri; \
73                         $(DEL_FILE) .qmake.cache; \
74                         (cd qmake && $(MAKE) distclean);
75 }
76 win32 {
77   confclean.commands += -$(DEL_FILE) src\\core\\global\\qconfig.h $$escape_expand(\\n\\t) \
78                         -$(DEL_FILE) src\\core\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
79                         -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
80                         -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
81                         (cd qmake && $(MAKE) distclean)
82 }
83 symbian {
84   confclean.depends += distclean
85   contains(QMAKE_HOST.os, "Windows") {
86     confclean.commands += \
87             (cd src\\tools\\moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
88             (cd src\\tools\\rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
89             (cd src\\tools\\uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \
90             -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \
91             -$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
92             -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
93             -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
94             (cd qmake && $(MAKE) distclean)
95   } else {
96     confclean.commands += \
97             (cd src/tools/moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
98             (cd src/tools/rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
99             (cd src/tools/uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \
100             -$(DEL_FILE) src/corelib/global/qconfig.h $$escape_expand(\\n\\t) \
101             -$(DEL_FILE) src/corelib/global/qconfig.cpp $$escape_expand(\\n\\t) \
102             -$(DEL_FILE) mkspecs/qconfig.pri $$escape_expand(\\n\\t) \
103             -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
104             (cd qmake && $(MAKE) distclean)
105   }
106 }
107 QMAKE_EXTRA_TARGETS += confclean
108 qmakeclean.commands += (cd qmake && $(MAKE) clean)
109 QMAKE_EXTRA_TARGETS += qmakeclean
110 CLEAN_DEPS += qmakeclean
111
112 CONFIG -= qt
113
114 ### installations ####
115
116 #qmake
117 qmake.path=$$[QT_INSTALL_BINS]
118 win32 {
119    qmake.files=$$QT_BUILD_TREE/bin/qmake.exe
120 } else {
121    qmake.files=$$QT_BUILD_TREE/bin/qmake
122 }
123 INSTALLS += qmake
124
125 #syncqt
126 syncqt.path=$$[QT_INSTALL_BINS]
127 syncqt.files=$$QT_BUILD_TREE/bin/syncqt
128 win32:syncqt.files=$$QT_BUILD_TREE/bin/syncqt.bat
129 INSTALLS += syncqt
130
131 #mkspecs
132 mkspecs.path=$$[QT_INSTALL_DATA]/mkspecs
133 mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$files($$QT_SOURCE_TREE/mkspecs/*)
134 mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules
135 unix { 
136    DEFAULT_QMAKESPEC = $$QMAKESPEC
137    DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
138    mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
139    mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/default
140 }
141 win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) {
142     # When shadow building on Windows, the default mkspec only exists in the build tree.
143     mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
144 }
145 INSTALLS += mkspecs