cleanup of saving high score files for single/multi-user installations
[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 # choose if more than one global score file entry for one player is allowed
42 # (default: MANY_PER_NAME)
43 # uncomment to install game in multi-user environment
44 # SCORE_ENTRIES = ONE_PER_NAME
45 # uncomment to install game in single-user environment (default)
46 # SCORE_ENTRIES = MANY_PER_NAME
47
48 # path for cross-compiling (only needed for non-native Windows build)
49 CROSS_PATH_WIN32 = /usr/local/cross-tools/i386-mingw32msvc
50
51
52 # -----------------------------------------------------------------------------
53 # there should be no need to change anything below
54 # -----------------------------------------------------------------------------
55
56 .EXPORT_ALL_VARIABLES:
57
58 SRC_DIR = src
59 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
60
61
62 # -----------------------------------------------------------------------------
63 # build targets
64 # -----------------------------------------------------------------------------
65
66 all:
67         @$(MAKE_CMD)
68
69 sdl:
70         @$(MAKE_CMD) TARGET=sdl
71
72 sdl2:
73         @$(MAKE_CMD) TARGET=sdl2
74
75 mac:
76         @$(MAKE_CMD) PLATFORM=macosx
77
78 cross-win32:
79         @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
80
81 clean:
82         @$(MAKE_CMD) clean
83
84 clean-git:
85         @$(MAKE_CMD) clean-git
86
87
88 # -----------------------------------------------------------------------------
89 # development, test, distribution build and packaging targets
90 # -----------------------------------------------------------------------------
91
92 auto-conf:
93         @$(MAKE_CMD) auto-conf
94
95 run: all
96         @$(MAKE_CMD) run
97
98 gdb: all
99         @$(MAKE_CMD) gdb
100
101 valgrind: all
102         @$(MAKE_CMD) valgrind
103
104 enginetest: all
105         ./Scripts/make_enginetest.sh
106
107 enginetestcustom: all
108         ./Scripts/make_enginetest.sh custom
109
110 enginetestfast: all
111         ./Scripts/make_enginetest.sh fast
112
113 enginetestnew: all
114         ./Scripts/make_enginetest.sh new
115
116 leveltest: all
117         ./Scripts/make_enginetest.sh leveltest
118
119 levelsketch_images: all
120         ./Scripts/make_levelsketch_images.sh
121
122 dist-clean:
123         @$(MAKE_CMD) dist-clean
124
125 dist-build-unix:
126         @BUILD_DIST=TRUE $(MAKE)
127
128 dist-build-win32:
129         @BUILD_DIST=TRUE $(MAKE) cross-win32
130
131 dist-build-macosx:
132         @BUILD_DIST=TRUE $(MAKE)
133
134 dist-package-unix:
135         ./Scripts/make_dist.sh package unix
136
137 dist-package-win32:
138         ./Scripts/make_dist.sh package win
139
140 dist-package-macosx:
141         ./Scripts/make_dist.sh package mac
142
143 dist-upload-unix:
144         ./Scripts/make_dist.sh upload unix
145
146 dist-upload-win32:
147         ./Scripts/make_dist.sh upload win
148
149 dist-upload-macosx:
150         ./Scripts/make_dist.sh upload mac
151
152 dist-package-all:
153         $(MAKE) dist-package-unix
154         $(MAKE) dist-package-win32
155         $(MAKE) dist-package-macosx
156
157 dist-upload-all:
158         $(MAKE) dist-upload-unix
159         $(MAKE) dist-upload-win32
160         $(MAKE) dist-upload-macosx
161
162 package-all: dist-package-all
163
164 upload-all: dist-upload-all
165
166 tags:
167         $(MAKE_CMD) tags
168
169 depend dep:
170         $(MAKE_CMD) depend