fixed receiving responses from score server
[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-package-emscripten:
191         $(MAKE_DIST) package emscripten
192
193 dist-copy-package-linux:
194         $(MAKE_DIST) copy-package linux
195
196 dist-copy-package-win32:
197         $(MAKE_DIST) copy-package win32
198
199 dist-copy-package-win64:
200         $(MAKE_DIST) copy-package win64
201
202 dist-copy-package-mac:
203         $(MAKE_DIST) copy-package mac
204
205 dist-copy-package-android:
206         $(MAKE_DIST) copy-package android
207
208 dist-copy-package-emscripten:
209         $(MAKE_DIST) copy-package emscripten
210
211 dist-upload-linux:
212         $(MAKE_DIST) upload linux
213
214 dist-upload-win32:
215         $(MAKE_DIST) upload win32
216
217 dist-upload-win64:
218         $(MAKE_DIST) upload win64
219
220 dist-upload-mac:
221         $(MAKE_DIST) upload mac
222
223 dist-upload-android:
224         $(MAKE_DIST) upload android
225
226 dist-upload-emscripten:
227         $(MAKE_DIST) upload emscripten
228
229 dist-deploy-emscripten:
230         $(MAKE_DIST) deploy emscripten
231
232 dist-package-all:
233         $(MAKE) dist-package-linux
234         $(MAKE) dist-package-win32
235         $(MAKE) dist-package-win64
236         $(MAKE) dist-package-mac
237         $(MAKE) dist-package-android
238         $(MAKE) dist-package-emscripten
239
240 dist-copy-package-all:
241         $(MAKE) dist-copy-package-linux
242         $(MAKE) dist-copy-package-win32
243         $(MAKE) dist-copy-package-win64
244         $(MAKE) dist-copy-package-mac
245         $(MAKE) dist-copy-package-android
246         $(MAKE) dist-copy-package-emscripten
247
248 dist-upload-all:
249         $(MAKE) dist-upload-linux
250         $(MAKE) dist-upload-win32
251         $(MAKE) dist-upload-win64
252         $(MAKE) dist-upload-mac
253         $(MAKE) dist-upload-android
254         $(MAKE) dist-upload-emscripten
255
256 dist-deploy-all:
257         $(MAKE) dist-deploy-emscripten
258
259 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
260
261 package-all: dist-package-all
262
263 copy-package-all: dist-copy-package-all
264
265 upload-all: dist-upload-all
266
267 deploy-all: dist-deploy-all
268
269 release-all: dist-release-all