annotate Makefile.cross-mingw @ 269:835f71eef167

Reorder some settings.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 10 Mar 2022 19:55:39 +0200
parents f0e180b13e05
children 0562e7b181b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
1 ###
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
2 ### For win32 version cross-compilation with MinGW suite @ Linux
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
3 ###
269
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
4 # Miscellaneous
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
5 QT5_MODULES = Core Gui Widgets Sql PrintSupport
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
6 QT5_PREFIX ?= /misc/packages/qt5-src
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
7 QT5_BASE ?= $(QT5_PREFIX)/qtbase
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
8
150
2a8c97753381 Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents: 142
diff changeset
9 USE_QTHTTP ?= yes
2a8c97753381 Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents: 142
diff changeset
10
269
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
11 PREFIX =
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
12 BINEXT = .exe
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
13
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
14
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
15 # Compiler/tools 64/32-bit
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
16 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
17 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
18 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
19 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
20 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
21 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
22 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
23 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
24 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
25 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
26 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
27
48
200ec310660a Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
200ec310660a Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 # Compiler flags and linker flags
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
30 DEFINES = -DUNICODE -DQT_NEEDS_QMAIN
150
2a8c97753381 Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents: 142
diff changeset
31 ifeq ($(USE_QTHTTP),yes)
2a8c97753381 Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents: 142
diff changeset
32 QT5_MODULES += Network
2a8c97753381 Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents: 142
diff changeset
33 DEFINES += -DUSE_QTHTTP
2a8c97753381 Make the backup stuff compile-time optional.
Matti Hamalainen <ccr@tnsp.org>
parents: 142
diff changeset
34 endif
48
200ec310660a Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 INCPATH = -I. \
69
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
36 -I$(QT5_BASE)/include \
87
43e14ba416e1 Simplify build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 81
diff changeset
37 $(addprefix -I$(QT5_BASE)/include/Qt,$(QT5_MODULES)) \
69
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
38 -I$(QT5_MULTIMEDIA)/include \
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
39 -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
40
184
87dfca9f704d Move optimization and warning CFLAGS and CXXFLAGS to Makefile.gen
Matti Hamalainen <ccr@tnsp.org>
parents: 150
diff changeset
41 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
42 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
43 LDFLAGS += -Wl,-s -Wl,-subsystem,windows -mthreads
52
1ac8fdd932b3 More work on build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
44
1ac8fdd932b3 More work on build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
45 APP_LIBS = -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 \
69
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
46 -L$(QT5_BASE)/lib \
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
47 $(QT5_BASE)/lib/libqtmain.a \
87
43e14ba416e1 Simplify build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 81
diff changeset
48 $(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
49
56
ac3daf42f781 Rename some files.
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
50 APP_DEP_LIBS = $(OBJPATH)winres.o
52
1ac8fdd932b3 More work on build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
51 APP_DEPS =
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
52
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
53 # Qt tools
69
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
54 QT_RCC = $(QT5_BASE)/bin/rcc
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
55
69
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
56 QT_MOC = $(QT5_BASE)/bin/moc
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
57 QT_MOC_FLAGS = --include moc_predefs.h
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
58 QT_MOC_RULES = moc_predefs.h
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
59
69
a242548ccce8 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
60 QT_UIC = $(QT5_BASE)/bin/uic
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
61 QT_UIC_FLAGS =
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
62
233
6a12c82d082e Cleanup build.
Matti Hamalainen <ccr@tnsp.org>
parents: 184
diff changeset
63 CLEAN_TARGETS += moc_predefs.h src/winres.rc
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
64
48
200ec310660a Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 include Makefile.gen