Mercurial > hg > syntilista
annotate Makefile.cross-mingw-win32 @ 256:2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 05 Dec 2019 03:16:56 +0200 |
parents | 6a12c82d082e |
children |
rev | line source |
---|---|
50 | 1 ### |
2 ### For win32 version cross-compilation with MinGW suite @ Linux | |
3 ### | |
150
2a8c97753381
Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
142
diff
changeset
|
4 USE_QTHTTP ?= yes |
2a8c97753381
Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
142
diff
changeset
|
5 |
256
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
6 ifeq ($(MINGW),64) |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
7 BINTOOL_PREFIX ?= x86_64-w64-mingw32- |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
8 MINGW_SYS_PATH ?= /usr/x86_64-w64-mingw32 |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
9 MINGW_LOCAL_PATH ?= /usr/local/x86_64-w64-mingw32 |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
10 OBJPATH ?= ./obj/win64/ |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
11 else |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
12 BINTOOL_PREFIX ?= i686-w64-mingw32- |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
13 MINGW_SYS_PATH ?= /usr/i686-w64-mingw32 |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
14 MINGW_LOCAL_PATH ?= /usr/local/i686-w64-mingw32 |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
15 OBJPATH ?= ./obj/win32/ |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
16 endif |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
17 |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
18 PREFIX = |
2bb7ae9816bb
Improve the MinGW cross compilation Makefile so that a 64bit version could be built.
Matti Hamalainen <ccr@tnsp.org>
parents:
233
diff
changeset
|
19 EXEEXT = .exe |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 # Miscellaneous |
150
2a8c97753381
Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
142
diff
changeset
|
22 QT5_MODULES = Core Gui Widgets Sql PrintSupport |
69 | 23 QT5_PREFIX ?= /misc/packages/qt5-src |
24 QT5_BASE ?= $(QT5_PREFIX)/qtbase | |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 # Compiler flags and linker flags |
50 | 27 DEFINES = -DUNICODE -DQT_NEEDS_QMAIN |
150
2a8c97753381
Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
142
diff
changeset
|
28 ifeq ($(USE_QTHTTP),yes) |
2a8c97753381
Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
142
diff
changeset
|
29 QT5_MODULES += Network |
2a8c97753381
Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
142
diff
changeset
|
30 DEFINES += -DUSE_QTHTTP |
2a8c97753381
Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
142
diff
changeset
|
31 endif |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 INCPATH = -I. \ |
69 | 33 -I$(QT5_BASE)/include \ |
87 | 34 $(addprefix -I$(QT5_BASE)/include/Qt,$(QT5_MODULES)) \ |
69 | 35 -I$(QT5_MULTIMEDIA)/include \ |
36 -I$(QT5_BASE)/mkspecs/win32-g++ | |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 |
184
87dfca9f704d
Move optimization and warning CFLAGS and CXXFLAGS to Makefile.gen
Matti Hamalainen <ccr@tnsp.org>
parents:
150
diff
changeset
|
38 CFLAGS += -pipe -fno-keep-inline-dllexport |
87dfca9f704d
Move optimization and warning CFLAGS and CXXFLAGS to Makefile.gen
Matti Hamalainen <ccr@tnsp.org>
parents:
150
diff
changeset
|
39 CXXFLAGS += -pipe -fno-keep-inline-dllexport -frtti -fexceptions -mthreads |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 LDFLAGS += -Wl,-s -Wl,-subsystem,windows -mthreads |
52 | 41 |
42 APP_LIBS = -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 \ | |
69 | 43 -L$(QT5_BASE)/lib \ |
44 $(QT5_BASE)/lib/libqtmain.a \ | |
87 | 45 $(addsuffix .a,$(addprefix $(QT5_BASE)/lib/libQt5,$(QT5_MODULES))) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 |
56 | 47 APP_DEP_LIBS = $(OBJPATH)winres.o |
52 | 48 APP_DEPS = |
50 | 49 |
50 # Qt tools | |
69 | 51 QT_RCC = $(QT5_BASE)/bin/rcc |
50 | 52 |
69 | 53 QT_MOC = $(QT5_BASE)/bin/moc |
50 | 54 QT_MOC_FLAGS = --include moc_predefs.h |
55 QT_MOC_RULES = moc_predefs.h | |
56 | |
69 | 57 QT_UIC = $(QT5_BASE)/bin/uic |
50 | 58 QT_UIC_FLAGS = |
59 | |
233 | 60 CLEAN_TARGETS += moc_predefs.h src/winres.rc |
50 | 61 |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 include Makefile.gen |