1#
2# qmake configuration for win32-g++
3#
4# Written for MinGW
5#
6
7MAKEFILE_GENERATOR      = MINGW
8TEMPLATE                = app
9CONFIG                  += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header cross-win32
10QT                      += core gui
11DEFINES                 += UNICODE QT_LARGEFILE_SUPPORT
12QMAKE_COMPILER_DEFINES  += __GNUC__ WIN32
13
14QMAKE_EXT_OBJ           = .o
15QMAKE_EXT_RES           = _res.o
16
17QMAKE_LEX               = flex
18QMAKE_LEXFLAGS          =
19QMAKE_YACC              = byacc
20QMAKE_YACCFLAGS         = -d
21QMAKE_CFLAGS            = -DHAVE_MINGW -DHAVE_WIN32 -DHAVE_MINGW_W64
22QMAKE_CFLAGS_DEPS       = -M
23QMAKE_CFLAGS_WARN_ON    = -Wall
24QMAKE_CFLAGS_WARN_OFF   = -w
25QMAKE_CFLAGS_RELEASE    = -O2
26QMAKE_CFLAGS_DEBUG      = -g -O2
27QMAKE_CFLAGS_YACC       = -Wno-unused -Wno-parentheses
28
29QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS -DHAVE_MINGW -DHAVE_WIN32 -DHAVE_ZLIB_H -DHAVE_LIBZ -DHAVE_CRYPTO -DHAVE_OPENSSL -DHAVE_TLS -DHAVE_MINGW_W64
30QMAKE_CXXFLAGS_DEPS     = $$QMAKE_CFLAGS_DEPS
31QMAKE_CXXFLAGS_WARN_ON  = $$QMAKE_CFLAGS_WARN_ON
32QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
33QMAKE_CXXFLAGS_RELEASE  = $$QMAKE_CFLAGS_RELEASE
34QMAKE_CXXFLAGS_DEBUG    = $$QMAKE_CFLAGS_DEBUG
35QMAKE_CXXFLAGS_YACC     = $$QMAKE_CFLAGS_YACC
36QMAKE_CXXFLAGS_THREAD   = $$QMAKE_CFLAGS_THREAD
37QMAKE_CXXFLAGS_RTTI_ON  = -frtti
38QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
39QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
40QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
41
42QMAKE_INCDIR            = $(DEPKGS)/depkgs-mingw32/include/pthreads $(DEPKGS)/depkgs-mingw32/include/ ../win32/compat
43QMAKE_INCDIR_QT         = $(DEPKGS)/depkgs-mingw32/include/qt
44QMAKE_LIBDIR_QT         = $(DEPKGS)/depkgs-mingw32/lib/qt
45
46QMAKE_RUN_CC            = $(CXX) -c $(CFLAGS) $(INCPATH) -o $obj $src
47QMAKE_RUN_CC_IMP        = $(CXX) -c $(CFLAGS) $(INCPATH) -o $@ $<
48QMAKE_RUN_CXX           = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
49QMAKE_RUN_CXX_IMP       = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
50
51QMAKE_LINK              = i686-w64-mingw32-g++
52QMAKE_LFLAGS            = -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -m32 -fno-strict-aliasing -Wl,-enable-runtime-pseudo-reloc
53
54QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
55QMAKE_LFLAGS_EXCEPTIONS_OFF =
56QMAKE_LFLAGS_RELEASE    = -Wl,-s
57QMAKE_LFLAGS_DEBUG      =
58QMAKE_LFLAGS_CONSOLE    = -Wl,-subsystem,console
59QMAKE_LFLAGS_WINDOWS    = -Wl,-subsystem,windows
60QMAKE_LFLAGS_DLL        = -shared
61QMAKE_LINK_OBJECT_MAX   = 10
62QMAKE_LINK_OBJECT_SCRIPT= object_script
63
64
65QMAKE_LIBS              = -lwsock32 -lstdc++
66QMAKE_LIBS_CORE         = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
67QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
68QMAKE_LIBS_NETWORK      = -lws2_32
69QMAKE_LIBS_OPENGL       = -lopengl32 -lglu32 -lgdi32 -luser32
70QMAKE_LIBS_COMPAT       = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
71QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqtmain
72
73MINGW_IN_SHELL          = 1
74QMAKE_DIR_SEP           = /
75QMAKE_COPY              = cp
76QMAKE_COPY_DIR          = cp -r
77QMAKE_MOVE              = mv
78QMAKE_DEL_FILE          = rm -f
79QMAKE_MKDIR             = mkdir -p
80QMAKE_DEL_DIR           = rm -rf
81QMAKE_RCC               = rcc
82QMAKE_CHK_DIR_EXISTS    = test -d
83
84QMAKE_MOC               = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
85QMAKE_UIC               = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
86QMAKE_IDC               = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
87
88QMAKE_IDL               = midl
89QMAKE_ZIP               = zip -r -9
90
91QMAKE_STRIP             = i686-w64-mingw32-strip
92QMAKE_STRIPFLAGS_LIB    += --strip-unneeded
93load(qt_config)
94