Mercurial > hg > dmlib
annotate Makefile.cross-mingw @ 2578:45ab96eb8daa
Cleanup a comment.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 12 Mar 2022 02:42:25 +0200 |
parents | 8ab923fe23ef |
children | 669b71e8b868 |
rev | line source |
---|---|
2418
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
1 ### |
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
2 ### For Win32/Win64 version cross-compilation via MinGW |
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
3 ### compiler suite under Linux/Unix |
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
4 ### |
0 | 5 # |
2354
289b8ae493ab
A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
2350
diff
changeset
|
6 # 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
|
7 # 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
|
8 # built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under |
2418
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
9 # __ /usr/local __ (not /usr!) in similar fashion. |
2354
289b8ae493ab
A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
2350
diff
changeset
|
10 # |
289b8ae493ab
A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
2350
diff
changeset
|
11 # 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
|
12 # 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
|
13 # |
2355
b436ecd76fa0
Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents:
2354
diff
changeset
|
14 # 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
|
15 # |
1166 | 16 |
2547
71f04d8e791e
Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
2418
diff
changeset
|
17 # NOTE! If you want to define the default path for C64 chargen |
2568
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
18 # ROM image file, you can set it with this define and/or Make |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
19 # parameter. Do take note of the somewhat peculiar quotation and |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
20 # escape of backlash '\'. Example: (notice the single quotes) |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
21 # |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
22 # make -f Makefile.cross-mingw CHARGEN='C:\\VICE-3.5\\C64\\chargen' |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
23 # |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
24 ifneq ($(CHARGEN),) |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
25 CFLAGS += -DDM_DEF_CHARGEN='"$(CHARGEN)"' |
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
26 else |
2547
71f04d8e791e
Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
2418
diff
changeset
|
27 CFLAGS += -DDM_DEF_CHARGEN='"C:\\VICE-3.5\\C64\\chargen"' |
2568
8ab923fe23ef
Add Make parameter/variable CHARGEN= for easier defining of
Matti Hamalainen <ccr@tnsp.org>
parents:
2547
diff
changeset
|
28 endif |
2547
71f04d8e791e
Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
2418
diff
changeset
|
29 |
71f04d8e791e
Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
2418
diff
changeset
|
30 |
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
|
31 ifeq ($(MINGW),64) |
2355
b436ecd76fa0
Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents:
2354
diff
changeset
|
32 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
|
33 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
|
34 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
|
35 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
|
36 else |
2355
b436ecd76fa0
Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents:
2354
diff
changeset
|
37 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
|
38 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
|
39 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
|
40 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
|
41 endif |
886 | 42 |
877
4a2ed354ab4c
Use ?= in the Makefiles to accept preset values.
Matti Hamalainen <ccr@tnsp.org>
parents:
841
diff
changeset
|
43 DMLIB ?= ./ |
4a2ed354ab4c
Use ?= in the Makefiles to accept preset values.
Matti Hamalainen <ccr@tnsp.org>
parents:
841
diff
changeset
|
44 BINPATH ?= ./exe/ |
2357 | 45 BINEXT ?= .exe |
2355
b436ecd76fa0
Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents:
2354
diff
changeset
|
46 CC = $(BINTOOL_PREFIX)gcc |
b436ecd76fa0
Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents:
2354
diff
changeset
|
47 AR = $(BINTOOL_PREFIX)ar |
b436ecd76fa0
Change MINGW_PREFIX to BINTOOL_PREFIX.
Matti Hamalainen <ccr@tnsp.org>
parents:
2354
diff
changeset
|
48 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
|
49 RM ?= rm |
0 | 50 |
2354
289b8ae493ab
A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
2350
diff
changeset
|
51 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
|
52 SDL_LDFLAGS ?= $(shell $(MINGW_LOCAL_PATH)/bin/sdl2-config --libs) |
424 | 53 |
1156
622a469932b1
Change direct assignments to ?=, so that those Makefile variables can be
Matti Hamalainen <ccr@tnsp.org>
parents:
1141
diff
changeset
|
54 SDL_TTF_CFLAGS ?= |
1557
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1432
diff
changeset
|
55 SDL_TTF_LDFLAGS ?= -lSDL2_ttf |
840
a9d0d35476ae
Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents:
424
diff
changeset
|
56 |
2354
289b8ae493ab
A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
2350
diff
changeset
|
57 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
|
58 TREMOR_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libvorbisidec.a $(MINGW_LOCAL_PATH)/lib/libogg.a |
0 | 59 |
2354
289b8ae493ab
A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
2350
diff
changeset
|
60 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
|
61 LIBPNG_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libpng.a |
424 | 62 |
1156
622a469932b1
Change direct assignments to ?=, so that those Makefile variables can be
Matti Hamalainen <ccr@tnsp.org>
parents:
1141
diff
changeset
|
63 ZLIB_CFLAGS ?= |
2354
289b8ae493ab
A bit more work on the MinGW 32/64bit build stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
2350
diff
changeset
|
64 #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
|
65 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
|
66 |
1432
a9516570cc26
Improve build, so that we can build the tools and tests with minimal
Matti Hamalainen <ccr@tnsp.org>
parents:
1398
diff
changeset
|
67 TOOL_LDFLAGS ?= -mconsole -lmingw32 |
0 | 68 |
1
6e169d87d963
Improve buildsystem to support more flexible builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
69 include $(DMLIB)Makefile.gen |