2011-04-27 10:05:43 +00:00
|
|
|
!if "$(SOURCE_PATH)" == ""
|
|
|
|
SOURCE_PATH = ..
|
|
|
|
!endif
|
|
|
|
!if "$(BUILD_PATH)" == ""
|
|
|
|
BUILD_PATH = ..
|
|
|
|
!endif
|
|
|
|
|
2012-03-09 09:50:23 +00:00
|
|
|
QMKSRC = $(SOURCE_PATH)\qmake
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#
|
2014-12-19 00:33:42 +00:00
|
|
|
# per-compiler options
|
2011-04-27 10:05:43 +00:00
|
|
|
#
|
|
|
|
!if "$(QMAKESPEC)" == "win32-icc"
|
2014-12-19 00:33:42 +00:00
|
|
|
CXX = icl
|
|
|
|
LINKER = link
|
2015-07-15 23:11:11 +00:00
|
|
|
CFLAGS_EXTRA = /Zc:forScope /Qstd=c++11
|
2016-06-16 06:21:03 +00:00
|
|
|
!elseif "$(QMAKESPEC)" == "win32-clang-msvc"
|
2016-02-10 12:05:26 +00:00
|
|
|
CXX = clang-cl
|
|
|
|
LINKER = link
|
|
|
|
CFLAGS_EXTRA = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value
|
2011-04-27 10:05:43 +00:00
|
|
|
!else
|
2014-12-19 00:33:42 +00:00
|
|
|
CXX = cl
|
|
|
|
LINKER = link
|
2017-03-18 02:09:06 +00:00
|
|
|
CFLAGS_EXTRA = /MP /wd4577 $(CFLAGS_CRT)
|
2014-12-19 00:33:42 +00:00
|
|
|
!endif # !win32-icc
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-16 06:21:03 +00:00
|
|
|
!if "$(QMAKESPEC)" != "win32-clang-msvc"
|
2016-02-10 12:05:26 +00:00
|
|
|
CFLAGS_PCH = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch
|
|
|
|
PCH_OBJECT = qmake_pch.obj
|
|
|
|
!endif
|
|
|
|
|
2013-11-21 13:33:01 +00:00
|
|
|
CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \
|
2016-06-16 06:21:03 +00:00
|
|
|
-W2 -nologo -O1 \
|
2011-04-27 10:05:43 +00:00
|
|
|
$(CFLAGS_EXTRA) \
|
2016-11-18 17:11:41 +00:00
|
|
|
-I$(QMKSRC) -I$(QMKSRC)\library -I$(QMKSRC)\generators -I$(QMKSRC)\generators\unix -I$(QMKSRC)\generators\win32 -I$(QMKSRC)\generators\mac \
|
2013-05-28 19:34:05 +00:00
|
|
|
-I$(INC_PATH) -I$(INC_PATH)\QtCore -I$(INC_PATH)\QtCore\$(QT_VERSION) -I$(INC_PATH)\QtCore\$(QT_VERSION)\QtCore \
|
2016-09-16 12:37:16 +00:00
|
|
|
-I$(BUILD_PATH)\src\corelib\global \
|
2011-04-27 10:05:43 +00:00
|
|
|
-I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \
|
2017-03-18 02:09:06 +00:00
|
|
|
-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS \
|
2015-09-18 01:17:40 +00:00
|
|
|
-DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \
|
2012-08-28 17:24:30 +00:00
|
|
|
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \
|
2016-09-16 12:37:16 +00:00
|
|
|
-DQT_NO_FOREACH -DUNICODE
|
2016-02-10 12:05:26 +00:00
|
|
|
CFLAGS = $(CFLAGS_PCH) $(CFLAGS_BARE) $(CFLAGS)
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
CXXFLAGS_BARE = $(CFLAGS_BARE)
|
|
|
|
CXXFLAGS = $(CFLAGS)
|
|
|
|
|
|
|
|
LFLAGS =
|
2013-12-12 14:11:36 +00:00
|
|
|
LIBS = ole32.lib advapi32.lib shell32.lib
|
2013-11-21 13:33:01 +00:00
|
|
|
ADDCLEAN = qmake.pdb qmake.ilk
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#qmake code
|
2013-05-29 18:18:51 +00:00
|
|
|
OBJS = project.obj main.obj ioutils.obj proitems.obj qmakevfs.obj \
|
2012-09-05 16:29:19 +00:00
|
|
|
qmakeglobals.obj qmakeparser.obj qmakeevaluator.obj qmakebuiltins.obj \
|
|
|
|
makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \
|
2014-07-24 14:17:34 +00:00
|
|
|
makefiledeps.obj metamakefile.obj xmloutput.obj \
|
2012-04-25 15:12:53 +00:00
|
|
|
msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \
|
2016-03-09 13:59:20 +00:00
|
|
|
msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#qt code
|
|
|
|
QTOBJS= \
|
|
|
|
qbitarray.obj \
|
|
|
|
qbuffer.obj \
|
|
|
|
qcryptographichash.obj \
|
|
|
|
qfilesystementry.obj \
|
|
|
|
qfilesystemengine.obj \
|
|
|
|
qfilesystemengine_win.obj \
|
|
|
|
qfilesystemiterator_win.obj \
|
|
|
|
qfsfileengine.obj \
|
|
|
|
qfsfileengine_iterator.obj \
|
2012-03-27 09:21:27 +00:00
|
|
|
qarraydata.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qbytearray.obj \
|
|
|
|
qvsnprintf.obj \
|
|
|
|
qbytearraymatcher.obj \
|
|
|
|
qdatetime.obj \
|
|
|
|
qdir.obj \
|
|
|
|
qdiriterator.obj \
|
2012-02-26 09:05:39 +00:00
|
|
|
qfiledevice.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qfile.obj \
|
|
|
|
qtemporaryfile.obj \
|
|
|
|
qabstractfileengine.obj \
|
|
|
|
qfsfileengine_win.obj \
|
|
|
|
qsystemlibrary.obj \
|
|
|
|
qfileinfo.obj \
|
|
|
|
qglobal.obj \
|
|
|
|
qhash.obj \
|
|
|
|
qiodevice.obj \
|
2015-05-01 11:02:16 +00:00
|
|
|
qringbuffer.obj \
|
2014-04-29 10:39:31 +00:00
|
|
|
qdebug.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qlist.obj \
|
|
|
|
qlinkedlist.obj \
|
|
|
|
qlocale.obj \
|
|
|
|
qlocale_tools.obj \
|
|
|
|
qlocale_win.obj \
|
2017-01-07 09:23:47 +00:00
|
|
|
qversionnumber.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qmalloc.obj \
|
|
|
|
qmap.obj \
|
2016-04-23 03:54:51 +00:00
|
|
|
qoperatingsystemversion.obj \
|
|
|
|
qoperatingsystemversion_win.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qregexp.obj \
|
|
|
|
qtextcodec.obj \
|
|
|
|
qutfcodec.obj \
|
|
|
|
qstring.obj \
|
2013-10-09 19:14:01 +00:00
|
|
|
qstring_compat.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qstringlist.obj \
|
2012-02-26 14:20:24 +00:00
|
|
|
qstringbuilder.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qsystemerror.obj \
|
|
|
|
qtextstream.obj \
|
|
|
|
qdatastream.obj \
|
|
|
|
quuid.obj \
|
2017-04-14 00:50:05 +00:00
|
|
|
qrandom.obj \
|
2011-04-27 10:05:43 +00:00
|
|
|
qsettings.obj \
|
|
|
|
qvariant.obj \
|
|
|
|
qsettings_win.obj \
|
|
|
|
qmetatype.obj \
|
|
|
|
qxmlstream.obj \
|
|
|
|
qxmlutils.obj \
|
2012-02-03 08:35:22 +00:00
|
|
|
qnumeric.obj \
|
2013-09-05 05:55:49 +00:00
|
|
|
qlogging.obj \
|
|
|
|
qjson.obj \
|
|
|
|
qjsondocument.obj \
|
|
|
|
qjsonparser.obj \
|
|
|
|
qjsonarray.obj \
|
|
|
|
qjsonobject.obj \
|
|
|
|
qjsonvalue.obj
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-11-07 14:59:22 +00:00
|
|
|
first all: $(BUILD_PATH)\bin\qmake.exe
|
2017-01-03 15:40:30 +00:00
|
|
|
binary: $(BUILD_PATH)\qmake\qmake.exe
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2017-01-03 15:40:30 +00:00
|
|
|
$(BUILD_PATH)\bin\qmake.exe: $(OBJS) $(QTOBJS) qlibraryinfo.obj
|
|
|
|
$(LINKER) $(LFLAGS) /OUT:$(BUILD_PATH)\bin\qmake.exe $(OBJS) $(QTOBJS) qlibraryinfo.obj $(PCH_OBJECT) $(LIBS)
|
|
|
|
|
|
|
|
$(BUILD_PATH)\qmake\qmake.exe: $(OBJS) $(QTOBJS) qlibraryinfo_final.obj
|
|
|
|
$(LINKER) $(LFLAGS) /OUT:$(BUILD_PATH)\qmake\qmake.exe $(OBJS) $(QTOBJS) qlibraryinfo_final.obj $(PCH_OBJECT) $(LIBS)
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
clean::
|
2017-01-03 15:40:30 +00:00
|
|
|
-del $(QTOBJS) qlibraryinfo.obj qlibraryinfo_final.obj
|
2011-04-27 10:05:43 +00:00
|
|
|
-del $(OBJS)
|
|
|
|
-del qmake_pch.obj
|
|
|
|
-del qmake_pch.pch
|
|
|
|
-del qmake.pdb
|
|
|
|
-del qmake.ilk
|
|
|
|
-del qmake.tds
|
|
|
|
|
|
|
|
distclean:: clean
|
2015-04-23 11:40:49 +00:00
|
|
|
-del $(BUILD_PATH)\bin\qmake.exe
|
2017-01-03 15:40:30 +00:00
|
|
|
-del $(BUILD_PATH)\qmake\qmake.exe
|
2015-04-23 11:40:49 +00:00
|
|
|
-del Makefile
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
.cpp.obj:
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
2016-02-10 12:05:26 +00:00
|
|
|
$(OBJS): $(PCH_OBJECT)
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-02-10 12:05:26 +00:00
|
|
|
$(QTOBJS): $(PCH_OBJECT)
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2017-01-03 15:40:30 +00:00
|
|
|
qlibraryinfo.obj: $(PCH_OBJECT)
|
|
|
|
qlibraryinfo_final.obj: $(PCH_OBJECT)
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
qmake_pch.obj:
|
2012-03-16 17:59:09 +00:00
|
|
|
$(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP $(QMKSRC)\qmake_pch.h
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-09-05 16:29:19 +00:00
|
|
|
{$(SOURCE_PATH)\qmake\library}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
{$(SOURCE_PATH)\qmake\generators\mac}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\qmake\generators\unix}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\qmake\generators\win32}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\qmake\generators}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\qmake}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\3rdparty\md5}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\corelib\codecs}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\corelib\global}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\corelib\io}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\corelib\kernel}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\corelib\plugin}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\corelib\tools}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
{$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
2013-09-05 05:55:49 +00:00
|
|
|
{$(SOURCE_PATH)\src\corelib\json}.cpp{}.obj::
|
|
|
|
$(CXX) $(CXXFLAGS) $<
|
|
|
|
|
2017-01-26 23:02:04 +00:00
|
|
|
# Make sure qstring_compat.obj and qlibraryinfo.obj aren't compiled with PCH enabled
|
2013-12-14 00:43:43 +00:00
|
|
|
qstring_compat.obj: $(SOURCE_PATH)\src\corelib\tools\qstring_compat.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS_BARE) $(SOURCE_PATH)\src\corelib\tools\qstring_compat.cpp
|
2017-01-03 15:40:30 +00:00
|
|
|
|
|
|
|
qlibraryinfo.obj: $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
|
2017-01-26 23:02:04 +00:00
|
|
|
$(CXX) $(CXXFLAGS_BARE) -DQT_BUILD_QMAKE_BOOTSTRAP $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
|
2017-01-03 15:40:30 +00:00
|
|
|
|
|
|
|
qlibraryinfo_final.obj: $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp $(BUILD_PATH)\src\corelib\global\qconfig.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -Foqlibraryinfo_final.obj $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
|