added "multiple_actions" option for clickable global animations
[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 #                  http://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/i386-mingw32msvc
43
44
45 # -----------------------------------------------------------------------------
46 # there should be no need to change anything below
47 # -----------------------------------------------------------------------------
48
49 .EXPORT_ALL_VARIABLES:
50
51 SRC_DIR = src
52 ANDROID_DIR ?= android
53
54 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
55 MAKE_CMD_ANDROID = $(MAKE) -C $(ANDROID_DIR)
56
57
58 # -----------------------------------------------------------------------------
59 # build targets
60 # -----------------------------------------------------------------------------
61
62 all:
63         @$(MAKE_CMD)
64
65 sdl:
66         @$(MAKE_CMD) TARGET=sdl
67
68 sdl2:
69         @$(MAKE_CMD) TARGET=sdl2
70
71 mac:
72         @$(MAKE_CMD) PLATFORM=macosx
73
74 cross-win32:
75         @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
76
77 android-compile:
78         @$(MAKE_CMD_ANDROID) compile
79
80 android-package:
81         @$(MAKE_CMD_ANDROID) package
82
83 android-install:
84         @$(MAKE_CMD_ANDROID) install
85
86 android-assets-toc:
87         @$(MAKE_CMD_ANDROID) assets-toc
88
89 android-clean:
90         @$(MAKE_CMD_ANDROID) clean
91
92 android: android-package
93
94 clean:
95         @$(MAKE_CMD) clean
96
97 clean-git:
98         @$(MAKE_CMD) clean-git
99
100 clean-android: android-clean
101
102
103 # -----------------------------------------------------------------------------
104 # development targets
105 # -----------------------------------------------------------------------------
106
107 MAKE_ENGINETEST = ./Scripts/make_enginetest.sh
108 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
109
110 auto-conf:
111         @$(MAKE_CMD) auto-conf
112
113 run: all
114         @$(MAKE_CMD) run
115
116 gdb: all
117         @$(MAKE_CMD) gdb
118
119 valgrind: all
120         @$(MAKE_CMD) valgrind
121
122 tags:
123         $(MAKE_CMD) tags
124
125 depend dep:
126         $(MAKE_CMD) depend
127
128 enginetest: all
129         $(MAKE_ENGINETEST)
130
131 enginetestcustom: all
132         $(MAKE_ENGINETEST) custom
133
134 enginetestfast: all
135         $(MAKE_ENGINETEST) fast
136
137 enginetestnew: all
138         $(MAKE_ENGINETEST) new
139
140 leveltest: all
141         $(MAKE_ENGINETEST) leveltest
142
143 levelsketch_images: all
144         $(MAKE_LEVELSKETCH)
145
146
147 # -----------------------------------------------------------------------------
148 # distribution targets
149 # -----------------------------------------------------------------------------
150
151 MAKE_DIST = ./Scripts/make_dist.sh
152
153 dist-clean:
154         @$(MAKE_CMD) dist-clean
155
156 dist-clean-android:
157         @$(MAKE_CMD_ANDROID) dist-clean
158
159 dist-build-unix:
160         @BUILD_DIST=TRUE $(MAKE)
161
162 dist-build-win32:
163         @BUILD_DIST=TRUE $(MAKE) cross-win32
164
165 dist-build-macosx:
166         @BUILD_DIST=TRUE $(MAKE)
167
168 dist-build-android:
169         @BUILD_DIST=TRUE $(MAKE) android
170
171 dist-package-unix:
172         $(MAKE_DIST) package unix
173
174 dist-package-win32:
175         $(MAKE_DIST) package win
176
177 dist-package-macosx:
178         $(MAKE_DIST) package mac
179
180 dist-package-android:
181         $(MAKE_DIST) package android
182
183 dist-copy-package-unix:
184         $(MAKE_DIST) copy-package unix
185
186 dist-copy-package-win32:
187         $(MAKE_DIST) copy-package win
188
189 dist-copy-package-macosx:
190         $(MAKE_DIST) copy-package mac
191
192 dist-copy-package-android:
193         $(MAKE_DIST) copy-package android
194
195 dist-upload-unix:
196         $(MAKE_DIST) upload unix
197
198 dist-upload-win32:
199         $(MAKE_DIST) upload win
200
201 dist-upload-macosx:
202         $(MAKE_DIST) upload mac
203
204 dist-upload-android:
205         $(MAKE_DIST) upload android
206
207 dist-package-all:
208         $(MAKE) dist-package-unix
209         $(MAKE) dist-package-win32
210         $(MAKE) dist-package-macosx
211         $(MAKE) dist-package-android
212
213 dist-copy-package-all:
214         $(MAKE) dist-copy-package-unix
215         $(MAKE) dist-copy-package-win32
216         $(MAKE) dist-copy-package-macosx
217         $(MAKE) dist-copy-package-android
218
219 dist-upload-all:
220         $(MAKE) dist-upload-unix
221         $(MAKE) dist-upload-win32
222         $(MAKE) dist-upload-macosx
223         $(MAKE) dist-upload-android
224
225 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
226
227 package-all: dist-package-all
228
229 copy-package-all: dist-copy-package_all
230
231 upload-all: dist-upload-all
232
233 release-all: dist-release-all