make QMakeMetaInfo a little less inefficient with libtool .la files
[profile/ivi/qtbase.git] / qmake / Makefile.win32-g++
1 ifeq "$(SOURCE_PATH)" ""
2 SOURCE_PATH = ..
3 endif
4
5 ifeq "$(BUILD_PATH)" ""
6 BUILD_PATH = ..
7 endif
8
9 CORESRC = $(SOURCE_PATH)/src/corelib
10 TOOLSRC = $(SOURCE_PATH)/tools
11 QMKSRC = $(SOURCE_PATH)/qmake
12
13 # SHELL is the full path of sh.exe, unless
14 # 1) it is found in the current directory
15 # 2) it is not found at all
16 # 3) it is overridden on the command line with an existing file
17 # ... otherwise it is always sh.exe. Specifically, SHELL from the
18 # environment has no effect.
19 #
20 # This check will fail if SHELL is explicitly set to a not
21 # sh-compatible shell. This is not a problem, because configure.exe
22 # will not do that.
23 ifeq ($(SHELL), sh.exe)
24     ifeq ($(wildcard $(CURDIR)/sh.exe), )
25         SH = 0
26     else
27         SH = 1
28     endif
29 else
30     SH = 1
31 endif
32
33 ifeq ($(SH), 1)
34     COPY = cp
35     DEL = rm -f
36 else
37     COPY = copy
38     DEL = del /f
39 endif
40
41 #
42 # specific stuff for mingw g++ make
43 #
44 CXX         =   g++
45 CFLAGS      =   -c -o$@ -O \
46                 -I$(QMKSRC) -I$(QMKSRC)/generators -I$(QMKSRC)/generators/unix -I$(QMKSRC)/generators/win32 -I$(QMKSRC)/generators/mac -I$(QMKSRC)/generators/integrity \
47                 -I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \
48                 -I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \
49                 -I$(SOURCE_PATH)/mkspecs/win32-g++  \
50                 -I$(SOURCE_PATH)/tools/shared \
51                 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED \
52                 -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \
53                 -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
54                 -DUNICODE
55 CXXFLAGS    =   $(CFLAGS)
56 LFLAGS      = -static-libgcc -s
57 LIBS        = -lole32 -luuid -ladvapi32 -lkernel32
58 LINKQMAKE   =   g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
59 ADDCLEAN    =
60
61
62 #qmake code
63 OBJS        = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
64               option.o winmakefile.o projectgenerator.o property.o meta.o \
65               makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
66               msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o \
67               msvc_objectmodel.o msbuild_objectmodel.o registry.o gbuild.o \
68               cesdkhandler.o
69
70 ifdef QMAKE_OPENSOURCE_EDITION
71 CFLAGS      += -DQMAKE_OPENSOURCE_EDITION
72 endif
73
74 #qt code
75 QTOBJS= \
76         qbitarray.o \
77         qbuffer.o \
78         qarraydata.o \
79         qbytearray.o \
80         qcryptographichash.o \
81         qvsnprintf.o \
82         qbytearraymatcher.o \
83         qconfig.o \
84         qdatetime.o \
85         qdir.o \
86         qdiriterator.o \
87         qfiledevice.o \
88         qfile.o \
89         qtemporaryfile.o \
90         qfileinfo.o \
91         qabstractfileengine.o \
92         qfilesystementry.o \
93         qfilesystemengine.o \
94         qfilesystemengine_win.o \
95         qfilesystemiterator_win.o \
96         qfsfileengine.o \
97         qfsfileengine_iterator.o \
98         qfsfileengine_win.o \
99         qglobal.o \
100         qhash.o \
101         qiodevice.o \
102         qlibraryinfo.o \
103         qlist.o \
104         qlinkedlist.o \
105         qlocale.o \
106         qlocale_tools.o \
107         qlocale_win.o \
108         qmalloc.o \
109         qmap.o \
110         qregexp.o \
111         qtextcodec.o \
112         qutfcodec.o \
113         qstring.o \
114         qstringlist.o \
115         qstringbuilder.o \
116         qsystemerror.o \
117         qsystemlibrary.o \
118         qtextstream.o \
119         quuid.o \
120         qvector.o \
121         qsettings.o \
122         qsettings_win.o \
123         qvariant.o \
124         qmetatype.o \
125         qxmlstream.o \
126         qxmlutils.o \
127         qnumeric.o \
128         qlogging.o
129
130
131 qmake.exe: $(OBJS) $(QTOBJS)
132         $(LINKQMAKE)
133         -$(COPY) qmake.exe $(BUILD_PATH)\bin\qmake.exe
134
135 Makefile: $(SOURCE_PATH)/qmake/Makefile.win32-g++
136         @echo "Out of date, please rerun configure"
137
138 clean::
139         -$(DEL) $(OBJS) $(QTOBJS) $(ADDCLEAN)
140
141 distclean:: clean
142         -$(DEL) qmake.exe
143
144 .c.o:
145         $(CXX) $(CFLAGS) $<
146
147 .cpp.o:
148         $(CXX) $(CXXFLAGS) $<
149
150 QTVPATH = $(TOOLSRC)/shared/windows:$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin:$(BUILD_PATH)/src/corelib/global
151 VPATH = $(QMKSRC):$(QMKSRC)/generators:$(QMKSRC)/generators/unix:$(QMKSRC)/generators/mac:$(QMKSRC)/generators/win32:$(QMKSRC)/generators/integrity:$(QTVPATH)
152
153 project.o: $(QMKSRC)/project.h $(QMKSRC)/option.h
154 meta.o: $(QMKSRC)/project.h $(QMKSRC)/option.h
155 main.o: $(QMKSRC)/project.h
156 option.o: $(QMKSRC)/option.h
157 property.o: $(QMKSRC)/project.h $(QMKSRC)/option.h