fixed typo
[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 # BASE_PATH = .
28 # use the following setting for Debian / Ubuntu installations:
29 # BASE_PATH = /usr/share/games/rocksndiamonds
30
31 # uncomment if system has no joystick include file
32 # JOYSTICK = -DNO_JOYSTICK
33
34 # path for cross-compiling (only needed for non-native Windows build)
35 CROSS_PATH_WIN32 = /usr/local/cross-tools/i686-w64-mingw32
36 CROSS_PATH_WIN64 = /usr/local/cross-tools/x86_64-w64-mingw32
37
38
39 # -----------------------------------------------------------------------------
40 # there should be no need to change anything below
41 # -----------------------------------------------------------------------------
42
43 .EXPORT_ALL_VARIABLES:
44
45 SRC_DIR = src
46 ANDROID_DIR ?= build-projects/android
47
48 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
49 MAKE_CMD_ANDROID = $(MAKE) -C $(ANDROID_DIR)
50
51
52 # -----------------------------------------------------------------------------
53 # build targets
54 # -----------------------------------------------------------------------------
55
56 all:
57         @$(MAKE_CMD)
58
59 cross-win32:
60         @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
61
62 cross-win64:
63         @PATH=$(CROSS_PATH_WIN64)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win64
64
65 android-prepare:
66         @$(MAKE_CMD_ANDROID) prepare
67
68 android-package:
69         @$(MAKE_CMD_ANDROID) package
70
71 android-clean:
72         @$(MAKE_CMD_ANDROID) clean
73
74 android: android-package
75
76 emscripten:
77         @emmake $(MAKE_CMD) PLATFORM=emscripten
78
79 clean:
80         @$(MAKE_CMD) clean
81
82 clean-git:
83         @$(MAKE_CMD) clean-git
84
85 clean-android: android-clean
86
87
88 # -----------------------------------------------------------------------------
89 # development targets
90 # -----------------------------------------------------------------------------
91
92 MAKE_ENGINETEST = ./tests/enginetest/enginetest.sh
93 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
94
95 auto-conf:
96         @$(MAKE_CMD) auto-conf
97
98 conf-time:
99         @$(MAKE_CMD) conf-time
100
101 conf-hash:
102         @$(MAKE_CMD) conf-hash
103
104 run: all
105         @$(MAKE_CMD) run
106
107 gdb: all
108         @$(MAKE_CMD) gdb
109
110 valgrind: all
111         @$(MAKE_CMD) valgrind
112
113 tags:
114         $(MAKE_CMD) tags
115
116 depend dep:
117         $(MAKE_CMD) depend
118
119 depend-clean dep-clean:
120         $(MAKE_CMD) depend-clean
121
122 enginetest: all
123         $(MAKE_ENGINETEST)
124
125 levelsketch_images: all
126         $(MAKE_LEVELSKETCH)
127
128
129 # -----------------------------------------------------------------------------
130 # distribution targets
131 # -----------------------------------------------------------------------------
132
133 MAKE_DIST = ./Scripts/make_dist.sh
134
135 dist-clean:
136         @$(MAKE_CMD) dist-clean
137
138 dist-clean-android:
139         @$(MAKE_CMD_ANDROID) dist-clean
140
141 dist-build-linux:
142         @BUILD_DIST=TRUE $(MAKE)
143
144 dist-build-win32:
145         @BUILD_DIST=TRUE $(MAKE) cross-win32
146
147 dist-build-win64:
148         @BUILD_DIST=TRUE $(MAKE) cross-win64
149
150 dist-build-mac:
151         @BUILD_DIST=TRUE $(MAKE)
152
153 dist-build-android:
154         @BUILD_DIST=TRUE $(MAKE) android
155
156 dist-build-emscripten:
157         @BUILD_DIST=TRUE $(MAKE) emscripten
158
159 dist-package-linux:
160         $(MAKE_DIST) package linux
161
162 dist-package-win32:
163         $(MAKE_DIST) package win32
164
165 dist-package-win64:
166         $(MAKE_DIST) package win64
167
168 dist-package-mac:
169         $(MAKE_DIST) package mac
170
171 dist-package-android:
172         $(MAKE_DIST) package android
173
174 dist-package-emscripten:
175         $(MAKE_DIST) package emscripten
176
177 dist-copy-package-linux:
178         $(MAKE_DIST) copy-package linux
179
180 dist-copy-package-win32:
181         $(MAKE_DIST) copy-package win32
182
183 dist-copy-package-win64:
184         $(MAKE_DIST) copy-package win64
185
186 dist-copy-package-mac:
187         $(MAKE_DIST) copy-package mac
188
189 dist-copy-package-android:
190         $(MAKE_DIST) copy-package android
191
192 dist-copy-package-emscripten:
193         $(MAKE_DIST) copy-package emscripten
194
195 dist-upload-linux:
196         $(MAKE_DIST) upload linux
197
198 dist-upload-win32:
199         $(MAKE_DIST) upload win32
200
201 dist-upload-win64:
202         $(MAKE_DIST) upload win64
203
204 dist-upload-mac:
205         $(MAKE_DIST) upload mac
206
207 dist-upload-android:
208         $(MAKE_DIST) upload android
209
210 dist-upload-emscripten:
211         $(MAKE_DIST) upload emscripten
212
213 dist-deploy-emscripten:
214         $(MAKE_DIST) deploy emscripten
215
216 dist-package-all:
217         $(MAKE) dist-package-linux
218         $(MAKE) dist-package-win32
219         $(MAKE) dist-package-win64
220         $(MAKE) dist-package-mac
221         $(MAKE) dist-package-android
222         $(MAKE) dist-package-emscripten
223
224 dist-copy-package-all:
225         $(MAKE) dist-copy-package-linux
226         $(MAKE) dist-copy-package-win32
227         $(MAKE) dist-copy-package-win64
228         $(MAKE) dist-copy-package-mac
229         $(MAKE) dist-copy-package-android
230         $(MAKE) dist-copy-package-emscripten
231
232 dist-upload-all:
233         $(MAKE) dist-upload-linux
234         $(MAKE) dist-upload-win32
235         $(MAKE) dist-upload-win64
236         $(MAKE) dist-upload-mac
237         $(MAKE) dist-upload-android
238         $(MAKE) dist-upload-emscripten
239
240 dist-deploy-all:
241         $(MAKE) dist-deploy-emscripten
242
243 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all dist-deploy-all
244
245 package-all: dist-package-all
246
247 copy-package-all: dist-copy-package-all
248
249 upload-all: dist-upload-all
250
251 deploy-all: dist-deploy-all
252
253 release-all: dist-release-all