annotate Makefile.cross-mingw @ 2414:69a5af2eb1ea

Remove useless dmMemset().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Jan 2020 23:27:01 +0200
parents 21d8eb203e2a
children 8abdd95139d6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #
879
d6b18e9a3a62 Comments, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 878
diff changeset
2 # For Win32/Win64 version cross-compilation via MinGW
d6b18e9a3a62 Comments, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 878
diff changeset
3 # compiler suite under Linux/Unix
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
5 # This Makefile assumes that you have MinGW installed under /usr
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
6 # the way Debian MinGW packages do. It also assumes that you have
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
7 # built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
8 # /usr/local in similar fashion.
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
9 #
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
10 # For differing configurations you will have to either edit this
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
11 # file or alternatively provide make parameters, e.g.
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
12 #
2355
b436ecd76fa0 Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents: 2354
diff changeset
13 # make -f Makefile.cross-mingw MINGW=64 BINTOOL_PREFIX=foo-bar-zoo
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
14 #
1166
f29fa5b6b748 Add dmMemset().
Matti Hamalainen <ccr@tnsp.org>
parents: 1156
diff changeset
15
2350
dbdce9a20d14 Add Makefile variable MINGW which determines which Windows target (x86-32 or 64bit) will be built.
Matti Hamalainen <ccr@tnsp.org>
parents: 1557
diff changeset
16 ifeq ($(MINGW),64)
2355
b436ecd76fa0 Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents: 2354
diff changeset
17 BINTOOL_PREFIX ?= x86_64-w64-mingw32-
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
18 MINGW_SYS_PATH ?= /usr/x86_64-w64-mingw32
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
19 MINGW_LOCAL_PATH ?= /usr/local/x86_64-w64-mingw32
2350
dbdce9a20d14 Add Makefile variable MINGW which determines which Windows target (x86-32 or 64bit) will be built.
Matti Hamalainen <ccr@tnsp.org>
parents: 1557
diff changeset
20 OBJPATH ?= ./obj/win64/
dbdce9a20d14 Add Makefile variable MINGW which determines which Windows target (x86-32 or 64bit) will be built.
Matti Hamalainen <ccr@tnsp.org>
parents: 1557
diff changeset
21 else
2355
b436ecd76fa0 Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents: 2354
diff changeset
22 BINTOOL_PREFIX ?= i686-w64-mingw32-
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
23 MINGW_SYS_PATH ?= /usr/i686-w64-mingw32
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
24 MINGW_LOCAL_PATH ?= /usr/local/i686-w64-mingw32
2350
dbdce9a20d14 Add Makefile variable MINGW which determines which Windows target (x86-32 or 64bit) will be built.
Matti Hamalainen <ccr@tnsp.org>
parents: 1557
diff changeset
25 OBJPATH ?= ./obj/win32/
dbdce9a20d14 Add Makefile variable MINGW which determines which Windows target (x86-32 or 64bit) will be built.
Matti Hamalainen <ccr@tnsp.org>
parents: 1557
diff changeset
26 endif
886
6abb6c25d8ed Reorder for clarity.
Matti Hamalainen <ccr@tnsp.org>
parents: 879
diff changeset
27
877
4a2ed354ab4c Use ?= in the Makefiles to accept preset values.
Matti Hamalainen <ccr@tnsp.org>
parents: 841
diff changeset
28 DMLIB ?= ./
4a2ed354ab4c Use ?= in the Makefiles to accept preset values.
Matti Hamalainen <ccr@tnsp.org>
parents: 841
diff changeset
29 BINPATH ?= ./exe/
2357
21d8eb203e2a s/EXEEXT/BINEXT/g
Matti Hamalainen <ccr@tnsp.org>
parents: 2355
diff changeset
30 BINEXT ?= .exe
2355
b436ecd76fa0 Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents: 2354
diff changeset
31 CC = $(BINTOOL_PREFIX)gcc
b436ecd76fa0 Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents: 2354
diff changeset
32 AR = $(BINTOOL_PREFIX)ar
b436ecd76fa0 Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents: 2354
diff changeset
33 RANLIB = $(BINTOOL_PREFIX)ranlib
1156
622a469932b1 Change direct assignments to ?=, so that those Makefile variables can be
Matti Hamalainen <ccr@tnsp.org>
parents: 1141
diff changeset
34 RM ?= rm
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
36 SDL_CFLAGS ?= $(shell $(MINGW_LOCAL_PATH)/bin/sdl2-config --cflags)
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
37 SDL_LDFLAGS ?= $(shell $(MINGW_LOCAL_PATH)/bin/sdl2-config --libs)
424
e88b2993801c Fix build for Win32.
Matti Hamalainen <ccr@tnsp.org>
parents: 112
diff changeset
38
1156
622a469932b1 Change direct assignments to ?=, so that those Makefile variables can be
Matti Hamalainen <ccr@tnsp.org>
parents: 1141
diff changeset
39 SDL_TTF_CFLAGS ?=
1557
5e5f75b45f8d Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents: 1432
diff changeset
40 SDL_TTF_LDFLAGS ?= -lSDL2_ttf
840
a9d0d35476ae Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents: 424
diff changeset
41
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
42 TREMOR_CFLAGS ?= -I$(MINGW_LOCAL_PATH)/include/tremor
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
43 TREMOR_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libvorbisidec.a $(MINGW_LOCAL_PATH)/lib/libogg.a
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
45 LIBPNG_CFLAGS ?= -I$(MINGW_LOCAL_PATH)/include
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
46 LIBPNG_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libpng.a
424
e88b2993801c Fix build for Win32.
Matti Hamalainen <ccr@tnsp.org>
parents: 112
diff changeset
47
1156
622a469932b1 Change direct assignments to ?=, so that those Makefile variables can be
Matti Hamalainen <ccr@tnsp.org>
parents: 1141
diff changeset
48 ZLIB_CFLAGS ?=
2354
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
49 #ZLIB_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libz.a
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
50 ZLIB_LDFLAGS ?= $(MINGW_SYS_PATH)/lib/libz.a
289b8ae493ab A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2350
diff changeset
51
424
e88b2993801c Fix build for Win32.
Matti Hamalainen <ccr@tnsp.org>
parents: 112
diff changeset
52
1432
a9516570cc26 Improve build, so that we can build the tools and tests with minimal
Matti Hamalainen <ccr@tnsp.org>
parents: 1398
diff changeset
53 TOOL_LDFLAGS ?= -mconsole -lmingw32
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54
1
6e169d87d963 Improve buildsystem to support more flexible builds.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
55 include $(DMLIB)Makefile.gen