annotate Makefile.cross-mingw @ 107:2b30217a3c39 default tip

Fix verbose build echos.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 29 Feb 2024 21:48:47 +0200
parents 10adf567b6f2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
77
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
1 ###
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
2 ### For Win32/Win64 version cross-compilation via MinGW
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
3 ### compiler suite under Linux/Unix
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
4 ###
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
5 #
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
6 # This Makefile assumes that you have MinGW installed under /usr
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
7 # the way Debian MinGW packages do. It also assumes that you have
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
8 # built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
9 # __ /usr/local __ (not /usr!) in similar fashion.
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
10 #
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
11 # For differing configurations you will have to either edit this
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
12 # file or alternatively provide make parameters, e.g.
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
13 #
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
14 # make -f Makefile.cross-mingw MINGW=64 BINTOOL_PREFIX=foo-bar-zoo
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
15 #
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
16
43
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 CXXFLAGS ?=
85
2ce1f9f288c7 Strip Windows executables by default.
Matti Hamalainen <ccr@tnsp.org>
parents: 84
diff changeset
18 LDFLAGS ?= -s
77
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
19
cc1c35357e39 Build system cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
20 BINPATH ?= ./
43
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 BINEXT ?= .exe
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 ifeq ($(MINGW),64)
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 BINTOOL_PREFIX ?= x86_64-w64-mingw32-
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 MINGW_SYS_PATH ?= /usr/x86_64-w64-mingw32
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 MINGW_LOCAL_PATH ?= /usr/local/x86_64-w64-mingw32
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 OBJPATH ?= ./obj/win64/
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 else
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 BINTOOL_PREFIX ?= i686-w64-mingw32-
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 MINGW_SYS_PATH ?= /usr/i686-w64-mingw32
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 MINGW_LOCAL_PATH ?= /usr/local/i686-w64-mingw32
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 OBJPATH ?= ./obj/win32/
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 endif
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 CC = $(BINTOOL_PREFIX)gcc
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 CXX = $(BINTOOL_PREFIX)g++
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 AR = $(BINTOOL_PREFIX)ar
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 RANLIB = $(BINTOOL_PREFIX)ranlib
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 SDL_CFLAGS ?= $(shell $(MINGW_LOCAL_PATH)/bin/sdl2-config --cflags)
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 SDL_LDFLAGS ?= $(shell $(MINGW_LOCAL_PATH)/bin/sdl2-config --libs)
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 GL_CFLAGS ?= -I$(MINGW_SYS_PATH)/include/
84
7747659639b6 Clean up LDFLAGS.
Matti Hamalainen <ccr@tnsp.org>
parents: 77
diff changeset
47 GL_LDFLAGS = -lopengl32 -lglu32
43
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48
84
7747659639b6 Clean up LDFLAGS.
Matti Hamalainen <ccr@tnsp.org>
parents: 77
diff changeset
49 LDFLAGS ?= -mconsole
7747659639b6 Clean up LDFLAGS.
Matti Hamalainen <ccr@tnsp.org>
parents: 77
diff changeset
50 TOOL_LDFLAGS ?=
43
a7d56f006063 Add Makefile for building Win32/64 binaries via MinGW cross-compiler on UNIX host.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
105
10adf567b6f2 Rename Makefile.gen to Makefile.common
Matti Hamalainen <ccr@tnsp.org>
parents: 85
diff changeset
52 include Makefile.common