annotate Makefile.cross-mingw @ 310:8541509ff8a0 default tip

Fix verbose build echos.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 29 Feb 2024 21:49:20 +0200
parents 18bef142108d
children
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 ###
302
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
4
303
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
5 INSTALL = install -s
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
6
302
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
7 # Qt version dependant stuff
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
8 QT_VERSION_PREFIX = Qt6
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
9 QT_PREFIX ?= /misc/packages/qt6-build/qtbase
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
10 QT_TOOL_PREFIX ?= /usr/lib/qt6/libexec/
269
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
11
302
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
12 QT_INCLUDES = \
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
13 -I$(QT_PREFIX)/include \
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
14 $(addprefix -I$(QT_PREFIX)/include/Qt,$(QT_MODULES))
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
15
269
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
16 BINEXT = .exe
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
17
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
18
835f71eef167 Reorder some settings.
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
19 # 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
20 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
21 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
22 OBJPATH ?= ./obj/win64/
305
8a1ddc9bd012 Theoretical 64-bit support, not tested.
Matti Hamalainen <ccr@tnsp.org>
parents: 304
diff changeset
23 PREFIX ?= win64/
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
24 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
25 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
26 OBJPATH ?= ./obj/win32/
305
8a1ddc9bd012 Theoretical 64-bit support, not tested.
Matti Hamalainen <ccr@tnsp.org>
parents: 304
diff changeset
27 PREFIX ?= win32/
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
28 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
29
303
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
30 APP_INSTALL_SYS_DLLS = libgcc_s_dw2-1 libstdc++-6
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
31
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
32 MINGW_CC1_PATH = $(shell $(BINTOOL_PREFIX)g++ -print-prog-name=cc1)
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
33 MINGW_LIBS_PATH = $(shell dirname $(MINGW_CC1_PATH))
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
34 MINGW_ZLIB1_PATH = $(shell $(BINTOOL_PREFIX)g++ -print-file-name=zlib1.dll)
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
35
48
200ec310660a Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
200ec310660a Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 # Compiler flags and linker flags
302
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
38 XCFLAGS += -fno-keep-inline-dllexport -Wno-attributes
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
39 CXXFLAGS += -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
1ac8fdd932b3 More work on build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
41
304
06c846192975 Remove useless libs.
Matti Hamalainen <ccr@tnsp.org>
parents: 303
diff changeset
42 APP_LIBS += \
290
755fe3f8c08f Minor build system cleanups in preparation for Qt6 support.
Matti Hamalainen <ccr@tnsp.org>
parents: 281
diff changeset
43 -L$(QT_PREFIX)/lib \
755fe3f8c08f Minor build system cleanups in preparation for Qt6 support.
Matti Hamalainen <ccr@tnsp.org>
parents: 281
diff changeset
44 $(addsuffix .a,$(addprefix $(QT_PREFIX)/lib/lib$(QT_VERSION_PREFIX),$(QT_MODULES)))
48
200ec310660a Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45
302
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
46
56
ac3daf42f781 Rename some files.
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
47 APP_DEP_LIBS = $(OBJPATH)winres.o
52
1ac8fdd932b3 More work on build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
48 APP_DEPS =
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
49
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
50 # Qt tools
302
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
51 QT_MOC_FLAGS =
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
52 QT_MOC_RULES =
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
53 QT_UIC_FLAGS =
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
54
302
52f0da883469 Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 301
diff changeset
55 CLEAN_TARGETS += src/winres.rc
50
402446a76794 And more build system work.
Matti Hamalainen <ccr@tnsp.org>
parents: 49
diff changeset
56
309
18bef142108d Rename Makefile.gen to Makefile.common
Matti Hamalainen <ccr@tnsp.org>
parents: 305
diff changeset
57 include Makefile.common
303
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
58
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
59
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
60 install: all
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
61 $(MKDIR_P) $(PREFIX)/platforms/
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
62 $(INSTALL) $(QT_PREFIX)/plugins/platforms/qwindows.dll $(PREFIX)/platforms/
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
63 $(MKDIR_P) $(PREFIX)/sqldrivers/
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
64 $(INSTALL) $(QT_PREFIX)/plugins/sqldrivers/qsqlite.dll $(PREFIX)/sqldrivers/
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
65 $(INSTALL) $(APP_BIN) $(PREFIX)
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
66 $(INSTALL) $(foreach DLL,$(QT_MODULES),$(QT_PREFIX)/bin/$(QT_VERSION_PREFIX)$(DLL).dll) $(PREFIX)
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
67 $(INSTALL) $(foreach DLL,$(APP_INSTALL_SYS_DLLS),$(MINGW_LIBS_PATH)/$(DLL).dll) $(PREFIX)
7edd1954fdaf Implement 'install' target in cross-mingw Makefile, remove the now
Matti Hamalainen <ccr@tnsp.org>
parents: 302
diff changeset
68 $(INSTALL) $(MINGW_ZLIB1_PATH) $(PREFIX)