fixed hiding mouse cursor in single-setp mode
[rocksndiamonds.git] / Makefile
1 # =============================================================================
2 # Rocks'n'Diamonds - McDuffin Strikes Back!
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2014 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 # default is '.' to be able to run program without installation
26 # RO_GAME_DIR = /usr/games
27 # use the following setting for Debian / Ubuntu installations:
28 # RO_GAME_DIR = /usr/share/games/rocksndiamonds
29
30 # directory for writable game data (like highscore files)
31 # default is '.' to be able to run program without installation
32 # RW_GAME_DIR = /var/games
33 # use the following setting for Debian / Ubuntu installations:
34 # RW_GAME_DIR = /var/games/rocksndiamonds
35
36 # uncomment if system has no joystick include file
37 # JOYSTICK = -DNO_JOYSTICK
38
39 # choose if more than one global score file entry for one player is allowed
40 # (default: MANY_PER_NAME)
41 # uncomment to install game in multi-user environment
42 # SCORE_ENTRIES = ONE_PER_NAME
43 # uncomment to install game in single-user environment (default)
44 # SCORE_ENTRIES = MANY_PER_NAME
45
46 # path for cross-compiling (only needed for non-native Windows build)
47 CROSS_PATH_WIN32 = /usr/local/cross-tools/i386-mingw32msvc
48
49 # compile special edition of R'n'D instead of the normal (classic) version
50 # SPECIAL_EDITION = rnd_jue
51
52
53 # -----------------------------------------------------------------------------
54 # there should be no need to change anything below
55 # -----------------------------------------------------------------------------
56
57 .EXPORT_ALL_VARIABLES:
58
59 SRC_DIR = src
60 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
61
62
63 # -----------------------------------------------------------------------------
64 # build targets
65 # -----------------------------------------------------------------------------
66
67 all:
68         @$(MAKE_CMD)
69
70 sdl:
71         @$(MAKE_CMD) TARGET=sdl
72
73 sdl2:
74         @$(MAKE_CMD) TARGET=sdl2
75
76 mac:
77         @$(MAKE_CMD) PLATFORM=macosx
78
79 mac-static:
80         @$(MAKE_CMD) PLATFORM=macosx STATIC=true
81
82 cross-win32:
83         @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
84
85 clean:
86         @$(MAKE_CMD) clean
87
88 clean-git:
89         @$(MAKE_CMD) clean-git
90
91
92 # -----------------------------------------------------------------------------
93 # development, test, distribution build and packaging targets
94 # -----------------------------------------------------------------------------
95
96 auto-conf:
97         @$(MAKE_CMD) auto-conf
98
99 run: all
100         @$(MAKE_CMD) run
101
102 gdb: all
103         @$(MAKE_CMD) gdb
104
105 valgrind: all
106         @$(MAKE_CMD) valgrind
107
108 enginetest: all
109         ./Scripts/make_enginetest.sh
110
111 enginetestcustom: all
112         ./Scripts/make_enginetest.sh custom
113
114 enginetestfast: all
115         ./Scripts/make_enginetest.sh fast
116
117 enginetestnew: all
118         ./Scripts/make_enginetest.sh new
119
120 leveltest: all
121         ./Scripts/make_enginetest.sh leveltest
122
123 levelsketch_images: all
124         ./Scripts/make_levelsketch_images.sh
125
126 backup:
127         ./Scripts/make_backup.sh src tar
128
129 backup-net-copy:
130         ./Scripts/make_backup.sh src scp
131
132 backup-all: backup backup-net-copy
133
134 backup_lev:
135         ./Scripts/make_backup.sh lev
136
137 backup_gfx:
138         ./Scripts/make_backup.sh gfx
139
140 # prerelease:
141 #       ./Scripts/make_prerelease.sh
142
143 jue:
144         @$(MAKE) SPECIAL_EDITION=rnd_jue all
145
146 jue-win:
147         @$(MAKE) SPECIAL_EDITION=rnd_jue cross-win32
148
149 dist-clean:
150         @$(MAKE_CMD) dist-clean
151
152 dist-build-unix:
153         @BUILD_DIST=TRUE $(MAKE)
154
155 dist-build-win32:
156         @BUILD_DIST=TRUE $(MAKE) cross-win32
157
158 dist-build-macosx:
159 #       (this is done by "dist-package-macosx" target)
160
161 dist-build-macosx-ppc:
162 #       (this is done by "dist-package-macosx-ppc" target)
163
164 dist-package-unix:
165         ./Scripts/make_dist.sh unix .
166
167 dist-package-win32:
168         ./Scripts/make_dist.sh win .
169
170 dist-package-macosx:
171         ./Scripts/make_dist.sh mac . $(MAKE)
172
173 dist-package-macosx-ppc:
174         ./Scripts/make_dist.sh mac-ppc . $(MAKE)
175
176 dist-upload-unix:
177         ./Scripts/make_dist.sh unix . upload
178
179 dist-upload-win32:
180         ./Scripts/make_dist.sh win . upload
181
182 dist-upload-macosx:
183         ./Scripts/make_dist.sh mac . upload
184
185 dist-upload-macosx-ppc:
186         ./Scripts/make_dist.sh mac-ppc . upload
187
188 dist-build-all:
189         $(MAKE) clean
190         $(MAKE) dist-build-unix         ; $(MAKE) dist-clean
191         $(MAKE) dist-build-win32        ; $(MAKE) dist-clean
192
193 dist-package-all:
194         $(MAKE) dist-package-unix
195         $(MAKE) dist-package-win32
196         $(MAKE) dist-package-macosx
197         $(MAKE) dist-package-macosx-ppc
198
199 dist-upload-all:
200         $(MAKE) dist-upload-unix
201         $(MAKE) dist-upload-win32
202         $(MAKE) dist-upload-macosx
203         $(MAKE) dist-upload-macosx-ppc
204
205 dist-all: dist-build-all dist-package-all
206
207 upload-all: dist-upload-all
208
209 tags:
210         $(MAKE_CMD) tags
211
212 depend dep:
213         $(MAKE_CMD) depend