annotate Makefile.cross-mingw @ 735:31bc1ed07cf5

Renaming BOOL->bool and TRUE/FALSE to true/false, and using stdbool.h if available.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 07 Dec 2022 12:14:39 +0200
parents 8e6caddfe117
children 7de6eb6d427c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
599
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
1 ###
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
2 ### For Win32/Win64 version cross-compilation via MinGW
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
3 ### compiler suite under Linux/Unix
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
4 ###
490
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
5 #
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
6 # This Makefile assumes that you have MinGW installed under /usr
599
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
7 # the way Debian MinGW packages do. It also assumes that you have
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
8 # built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
9 # __ /usr/local __ (not /usr!) in similar fashion.
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
10 #
490
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
11 # For differing configurations you will have to either edit this
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
12 # file or alternatively provide make parameters, e.g.
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
13 #
599
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
14 # make -f Makefile.cross-mingw MINGW=64 BINTOOL_PREFIX=foo-bar-zoo
434
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
490
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
17 ifeq ($(MINGW),64)
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
18 BINTOOL_PREFIX ?= x86_64-w64-mingw32-
599
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
19 MINGW_SYS_PATH ?= /usr/x86_64-w64-mingw32
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
20 MINGW_LOCAL_PATH ?= /usr/local/x86_64-w64-mingw32
490
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
21 OBJPATH ?= ./obj/win64/
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
22 else
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
23 BINTOOL_PREFIX ?= i686-w64-mingw32-
599
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
24 MINGW_SYS_PATH ?= /usr/i686-w64-mingw32
ee165ef28b6f Improve few Makefile comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 576
diff changeset
25 MINGW_LOCAL_PATH ?= /usr/local/i686-w64-mingw32
490
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
26 OBJPATH ?= ./obj/win32/
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
27 endif
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
28
ad647427303a Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 484
diff changeset
29
434
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 # Miscellaneous
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 PREFIX =
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 BINPATH = ./
562
5d2c1bfc04aa Rename EXEEXT to BINEXT in the build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 493
diff changeset
33 BINEXT = .exe
434
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 # Compiler flags and linker flags
493
3a733cdfc576 Remove some useless things.
Matti Hamalainen <ccr@tnsp.org>
parents: 491
diff changeset
36 CFLAGS += \
637
8e6caddfe117 Cosmetic Windows/MINGW Makefile flags reorder.
Matti Hamalainen <ccr@tnsp.org>
parents: 599
diff changeset
37 -mconsole \
8e6caddfe117 Cosmetic Windows/MINGW Makefile flags reorder.
Matti Hamalainen <ccr@tnsp.org>
parents: 599
diff changeset
38 -DTH_BYTEORDER=TH_LITTLE_ENDIAN \
491
76653f979a62 Build fixes.
Matti Hamalainen <ccr@tnsp.org>
parents: 490
diff changeset
39 -DHAVE_STRING_H \
735
31bc1ed07cf5 Renaming BOOL->bool and TRUE/FALSE to true/false, and using stdbool.h if available.
Matti Hamalainen <ccr@tnsp.org>
parents: 637
diff changeset
40 -DHAVE_STDBOOL_H \
637
8e6caddfe117 Cosmetic Windows/MINGW Makefile flags reorder.
Matti Hamalainen <ccr@tnsp.org>
parents: 599
diff changeset
41 -DHAVE_INTTYPES_H
457
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 453
diff changeset
42
493
3a733cdfc576 Remove some useless things.
Matti Hamalainen <ccr@tnsp.org>
parents: 491
diff changeset
43 LDFLAGS +=
434
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 ###
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 ### Stuff
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 ###
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 #NOINST_TARGETS += $(ENDIANCHK_BIN) config.h
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 #THLIBS_DEP += config.h
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 include Makefile.gen
8c3b3d8009f6 Add Mingw/win32 cross-build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53