use VPATH to locate sources
[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. -Igenerators -Igenerators/unix \
47                 -Igenerators/win32 -Igenerators/mac \
48                 -Igenerators/integrity \
49                 -I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \
50                 -I$(SOURCE_PATH)/include -I$(SOURCE_PATH)/include/QtCore -I$(SOURCE_PATH)/include/QtCore/$(QT_VERSION) -I$(SOURCE_PATH)/include/QtCore/$(QT_VERSION)/QtCore \
51                 -I$(BUILD_PATH)/src/corelib/global \
52                 -I$(BUILD_PATH)/src/corelib/xml \
53                 -I$(SOURCE_PATH)/mkspecs/win32-g++  \
54                 -I$(SOURCE_PATH)/tools/shared \
55                 -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT \
56                 -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \
57                 -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
58                 -DQT_BOOTSTRAPPED
59 CXXFLAGS    =   $(CFLAGS)
60 LFLAGS      = -static-libgcc -s
61 LIBS        = -lole32 -luuid -ladvapi32 -lkernel32
62 LINKQMAKE   =   g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
63 ADDCLEAN    =
64
65
66 #qmake code
67 OBJS        = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
68               option.o winmakefile.o projectgenerator.o property.o meta.o \
69               makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
70               borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o \
71               msvc_objectmodel.o msbuild_objectmodel.o registry.o gbuild.o
72
73 ifdef QMAKE_OPENSOURCE_EDITION
74 CFLAGS      += -DQMAKE_OPENSOURCE_EDITION
75 endif
76
77 #qt code
78 QTOBJS= \
79         qbitarray.o \
80         qbuffer.o \
81         qbytearray.o \
82         qcryptographichash.o \
83         qvsnprintf.o \
84         qbytearraymatcher.o \
85         qconfig.o \
86         qdatetime.o \
87         qdir.o \
88         qdiriterator.o \
89         qfile.o \
90         qtemporaryfile.o \
91         qfileinfo.o \
92         qabstractfileengine.o \
93         qfilesystementry.o \
94         qfilesystemengine.o \
95         qfilesystemengine_win.o \
96         qfilesystemiterator_win.o \
97         qfsfileengine.o \
98         qfsfileengine_iterator.o \
99         qfsfileengine_win.o \
100         qglobal.o \
101         qhash.o \
102         qiodevice.o \
103         qlibraryinfo.o \
104         qlist.o \
105         qlinkedlist.o \
106         qlocale.o \
107         qlocale_tools.o \
108         qlocale_win.o \
109         qmalloc.o \
110         qmap.o \
111         qregexp.o \
112         qtextcodec.o \
113         qutfcodec.o \
114         qstring.o \
115         qstringlist.o \
116         qsystemerror.o \
117         qsystemlibrary.o \
118         qtextstream.o \
119         quuid.o \
120         qvector.o \
121         qurl.o \
122         qsettings.o \
123         qsettings_win.o \
124         qvariant.o \
125         qmetatype.o \
126         qxmlstream.o \
127         qxmlutils.o \
128         qnumeric.o \
129         qlogging.o
130
131
132 qmake.exe: $(OBJS) $(QTOBJS)
133         $(LINKQMAKE)
134         -$(COPY) qmake.exe $(BUILD_PATH)\bin\qmake.exe
135
136 Makefile: Makefile.win32-g++
137         @echo "Out of date, please rerun configure"
138
139 clean::
140         -$(DEL) $(OBJS) $(QTOBJS) $(ADDCLEAN)
141
142 distclean:: clean
143         -$(DEL) qmake.exe
144
145 .c.o:
146         $(CXX) $(CFLAGS) $<
147
148 .cpp.o:
149         $(CXX) $(CXXFLAGS) $<
150
151 QTVPATH = $(TOOLSRC)/shared/windows:$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin:$(BUILD_PATH)/src/corelib/global
152 VPATH = $(QMKSRC):$(QMKSRC)/generators:$(QMKSRC)/generators/unix:$(QMKSRC)/generators/mac:$(QMKSRC)/generators/win32:$(QMKSRC)/generators/integrity:$(QTVPATH)
153
154 project.o: $(QMKSRC)/project.h $(QMKSRC)/option.h
155 meta.o: $(QMKSRC)/project.h $(QMKSRC)/option.h
156 main.o: $(QMKSRC)/project.h
157 option.o: $(QMKSRC)/option.h
158 property.o: $(QMKSRC)/project.h $(QMKSRC)/option.h