Mercurial > hg > th-libs
annotate Makefile.cross-mingw @ 676:f3649df3d9a7
Adjust errno handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 25 Feb 2020 07:42:50 +0200 |
parents | 8e6caddfe117 |
children | 31bc1ed07cf5 |
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 | 5 # |
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 | 11 # For differing configurations you will have to either edit this |
12 # file or alternatively provide make parameters, e.g. | |
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 | 17 ifeq ($(MINGW),64) |
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 | 21 OBJPATH ?= ./obj/win64/ |
22 else | |
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 | 26 OBJPATH ?= ./obj/win32/ |
27 endif | |
28 | |
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 | 39 -D_NO_BOOL_TYPEDEF \ |
40 -DHAVE_STRING_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 |