Mercurial > hg > sidinfo
annotate Makefile.cross-mingw @ 353:bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 21 Jan 2020 08:09:13 +0200 |
parents | |
children | db64a58314a9 |
rev | line source |
---|---|
353
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 ### |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 ### For Win32/Win64 version cross-compilation via MinGW |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 ### compiler suite under Linux/Unix |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 ### |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 # |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 # This Makefile assumes that you have MinGW installed under /usr |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 # the way Debian MinGW packages do. It also assumes that you have |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 # built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 # __ /usr/local __ (not /usr!) in similar fashion. |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 # |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 # For differing configurations you will have to either edit this |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 # file or alternatively provide make parameters, e.g. |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 # |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 # make -f Makefile.cross-mingw MINGW=64 BINTOOL_PREFIX=foo-bar-zoo |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 # |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
16 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 ifeq ($(MINGW),64) |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 BINTOOL_PREFIX ?= x86_64-w64-mingw32- |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 MINGW_SYS_PATH ?= /usr/x86_64-w64-mingw32 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 MINGW_LOCAL_PATH ?= /usr/local/x86_64-w64-mingw32 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 OBJPATH ?= ./obj/win64/ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 else |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 BINTOOL_PREFIX ?= i686-w64-mingw32- |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 MINGW_SYS_PATH ?= /usr/i686-w64-mingw32 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 MINGW_LOCAL_PATH ?= /usr/local/i686-w64-mingw32 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 OBJPATH ?= ./obj/win32/ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 endif |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 # Miscellaneous |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 PREFIX = |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 BINPATH = ./ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 BINEXT = .exe |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 # Compiler flags and linker flags |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 CFLAGS += \ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 -mconsole \ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 -DTH_BYTEORDER=TH_LITTLE_ENDIAN \ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 -D_NO_BOOL_TYPEDEF \ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 -DHAVE_STRING_H \ |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 -DHAVE_INTTYPES_H |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 LDFLAGS += -s |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 STILGREPC_LDFLAGS += -lole32 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
47 ### |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 ### Stuff |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
49 ### |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
50 #NOINST_TARGETS += $(ENDIANCHK_BIN) config.h |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 #THLIBS_DEP += config.h |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
52 |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
53 include Makefile.gen |
bf954444cce7
Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
54 |