added using setup values for tile selection cursor for MM game engine
[rocksndiamonds.git] / Makefile
1 # =============================================================================
2 # Rocks'n'Diamonds - McDuffin Strikes Back!
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2015 by Artsoft Entertainment
5 #                  Holger Schemel
6 #                  info@artsoft.org
7 #                  https://www.artsoft.org/
8 # -----------------------------------------------------------------------------
9 # Makefile
10 # =============================================================================
11
12 # -----------------------------------------------------------------------------
13 # configuration
14 # -----------------------------------------------------------------------------
15
16 # command name of your favorite ANSI C compiler
17 # (this must be set to "cc" for some systems)
18 CC = gcc
19
20 # command name of GNU make on your system
21 # (this must be set to "gmake" for some systems)
22 MAKE = make
23
24 # directory for read-only game data (like graphics, sounds, levels)
25 # (this directory is usually the game's installation directory)
26 # default is '.' to be able to run program without installation
27 # RO_GAME_DIR = .
28 # use the following setting for Debian / Ubuntu installations:
29 # RO_GAME_DIR = /usr/share/games/rocksndiamonds
30
31 # directory for writable game data (like highscore files)
32 # (if no "scores" directory exists, scores are saved in user data directory)
33 # default is '.' to be able to run program without installation
34 # RW_GAME_DIR = .
35 # use the following setting for Debian / Ubuntu installations:
36 # RW_GAME_DIR = /var/games/rocksndiamonds
37
38 # uncomment if system has no joystick include file
39 # JOYSTICK = -DNO_JOYSTICK
40
41 # path for cross-compiling (only needed for non-native Windows build)
42 CROSS_PATH_WIN32 = /usr/local/cross-tools/i686-w64-mingw32
43 CROSS_PATH_WIN64 = /usr/local/cross-tools/x86_64-w64-mingw32
44
45
46 # -----------------------------------------------------------------------------
47 # there should be no need to change anything below
48 # -----------------------------------------------------------------------------
49
50 .EXPORT_ALL_VARIABLES:
51
52 SRC_DIR = src
53 ANDROID_DIR ?= build-projects/android
54
55 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
56 MAKE_CMD_ANDROID = $(MAKE) -C $(ANDROID_DIR)
57
58
59 # -----------------------------------------------------------------------------
60 # build targets
61 # -----------------------------------------------------------------------------
62
63 all:
64         @$(MAKE_CMD)
65
66 cross-win32:
67         @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
68
69 cross-win64:
70         @PATH=$(CROSS_PATH_WIN64)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win64
71
72 android-prepare:
73         @$(MAKE_CMD_ANDROID) prepare
74
75 android-package:
76         @$(MAKE_CMD_ANDROID) package
77
78 android-clean:
79         @$(MAKE_CMD_ANDROID) clean
80
81 android: android-package
82
83 emscripten:
84         @emmake $(MAKE_CMD) PLATFORM=emscripten
85
86 clean:
87         @$(MAKE_CMD) clean
88
89 clean-git:
90         @$(MAKE_CMD) clean-git
91
92 clean-android: android-clean
93
94
95 # -----------------------------------------------------------------------------
96 # development targets
97 # -----------------------------------------------------------------------------
98
99 MAKE_ENGINETEST = ./Scripts/make_enginetest.sh
100 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
101
102 auto-conf:
103         @$(MAKE_CMD) auto-conf
104
105 conf-time:
106         @$(MAKE_CMD) conf-time
107
108 conf-hash:
109         @$(MAKE_CMD) conf-hash
110
111 run: all
112         @$(MAKE_CMD) run
113
114 gdb: all
115         @$(MAKE_CMD) gdb
116
117 valgrind: all
118         @$(MAKE_CMD) valgrind
119
120 tags:
121         $(MAKE_CMD) tags
122
123 depend dep:
124         $(MAKE_CMD) depend
125
126 enginetest: all
127         $(MAKE_ENGINETEST)
128
129 enginetestcustom: all
130         $(MAKE_ENGINETEST) custom
131
132 enginetestfast: all
133         $(MAKE_ENGINETEST) fast
134
135 enginetestnew: all
136         $(MAKE_ENGINETEST) new
137
138 leveltest: all
139         $(MAKE_ENGINETEST) leveltest
140
141 levelsketch_images: all
142         $(MAKE_LEVELSKETCH)
143
144
145 # -----------------------------------------------------------------------------
146 # distribution targets
147 # -----------------------------------------------------------------------------
148
149 MAKE_DIST = ./Scripts/make_dist.sh
150
151 dist-clean:
152         @$(MAKE_CMD) dist-clean
153
154 dist-clean-android:
155         @$(MAKE_CMD_ANDROID) dist-clean
156
157 dist-build-linux:
158         @BUILD_DIST=TRUE $(MAKE)
159
160 dist-build-win32:
161         @BUILD_DIST=TRUE $(MAKE) cross-win32
162
163 dist-build-win64:
164         @BUILD_DIST=TRUE $(MAKE) cross-win64
165
166 dist-build-mac:
167         @BUILD_DIST=TRUE $(MAKE)
168
169 dist-build-android:
170         @BUILD_DIST=TRUE $(MAKE) android
171
172 dist-build-emscripten:
173         @BUILD_DIST=TRUE $(MAKE) emscripten
174
175 dist-package-linux:
176         $(MAKE_DIST) package linux
177
178 dist-package-win32:
179         $(MAKE_DIST) package win32
180
181 dist-package-win64:
182         $(MAKE_DIST) package win64
183
184 dist-package-mac:
185         $(MAKE_DIST) package mac
186
187 dist-package-android:
188         $(MAKE_DIST) package android
189
190 dist-copy-package-linux:
191         $(MAKE_DIST) copy-package linux
192
193 dist-copy-package-win32:
194         $(MAKE_DIST) copy-package win32
195
196 dist-copy-package-win64:
197         $(MAKE_DIST) copy-package win64
198
199 dist-copy-package-mac:
200         $(MAKE_DIST) copy-package mac
201
202 dist-copy-package-android:
203         $(MAKE_DIST) copy-package android
204
205 dist-upload-linux:
206         $(MAKE_DIST) upload linux
207
208 dist-upload-win32:
209         $(MAKE_DIST) upload win32
210
211 dist-upload-win64:
212         $(MAKE_DIST) upload win64
213
214 dist-upload-mac:
215         $(MAKE_DIST) upload mac
216
217 dist-upload-android:
218         $(MAKE_DIST) upload android
219
220 dist-package-all:
221         $(MAKE) dist-package-linux
222         $(MAKE) dist-package-win32
223         $(MAKE) dist-package-win64
224         $(MAKE) dist-package-mac
225         $(MAKE) dist-package-android
226
227 dist-copy-package-all:
228         $(MAKE) dist-copy-package-linux
229         $(MAKE) dist-copy-package-win32
230         $(MAKE) dist-copy-package-win64
231         $(MAKE) dist-copy-package-mac
232         $(MAKE) dist-copy-package-android
233
234 dist-upload-all:
235         $(MAKE) dist-upload-linux
236         $(MAKE) dist-upload-win32
237         $(MAKE) dist-upload-win64
238         $(MAKE) dist-upload-mac
239         $(MAKE) dist-upload-android
240
241 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
242
243 package-all: dist-package-all
244
245 copy-package-all: dist-copy-package-all
246
247 upload-all: dist-upload-all
248
249 release-all: dist-release-all