rnd-20020803-1-src
[rocksndiamonds.git] / Makefile
1 #=============================================================================#
2 # Makefile for Rocks'n'Diamonds                                               #
3 # (c) 1995-2002 Holger Schemel, info@artsoft.org                              #
4 #=============================================================================#
5
6 #-----------------------------------------------------------------------------#
7 # configuration section                                                       #
8 #-----------------------------------------------------------------------------#
9
10 # specify command name of your favorite ANSI C compiler
11 # (this must be set to "cc" for some systems)
12 CC = gcc
13
14 # specify command name of GNU make on your system
15 # (this must be set to "gmake" for some systems)
16 MAKE = make
17
18 # specify path to X11 on your system
19 X11_PATH = /usr/X11R6
20
21 # specify directory for read-only game data (like graphics, sounds, levels)
22 # default is '.', so you can play without installing game data somewhere
23 # RO_GAME_DIR = /usr/games
24
25 # specify directory for writable game data (like highscore files)
26 # default is '.', so you can play without installing game data somewhere
27 # RW_GAME_DIR = /var/games
28
29 # uncomment this if your system has no joystick include file
30 # JOYSTICK = -DNO_JOYSTICK
31
32 # choose if you want to allow many global score file entries for one player
33 # default is 'MANY_PER_NAME'
34 # when installing the game in a multi user environment, choose this
35 # SCORE_ENTRIES = ONE_PER_NAME
36 # when installing the game in a single user environment, choose this
37 # SCORE_ENTRIES = MANY_PER_NAME
38
39 # specify paths for cross-compiling (only needed for MS-DOS and Win32 build)
40 CROSS_PATH_MSDOS=/usr/local/cross-msdos/i386-msdosdjgpp
41 CROSS_PATH_WIN32=/usr/local/cross-tools/i386-mingw32msvc
42
43 #-----------------------------------------------------------------------------#
44 # you should not need to change anything below                                #
45 #-----------------------------------------------------------------------------#
46
47 .EXPORT_ALL_VARIABLES:
48
49 SRC_DIR = src
50 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
51
52 all:
53         @$(MAKE_CMD) TARGET=x11
54
55 x11:
56         @$(MAKE_CMD) TARGET=x11
57
58 sdl:
59         @$(MAKE_CMD) TARGET=sdl
60
61 solaris:
62         @$(MAKE_CMD) PLATFORM=solaris TARGET=x11
63
64 solaris-sdl:
65         @$(MAKE_CMD) PLATFORM=solaris TARGET=sdl
66
67 mac:
68         @$(MAKE_CMD) PLATFORM=macosx
69
70 msdos:
71         @$(MAKE_CMD) PLATFORM=msdos
72
73 cross-msdos:
74         @PATH=$(CROSS_PATH_MSDOS)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-msdos
75
76 cross-win32:
77         @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
78
79 clean:
80         @$(MAKE_CMD) clean
81
82
83 #-----------------------------------------------------------------------------#
84 # development only stuff                                                      #
85 #-----------------------------------------------------------------------------#
86
87 run:
88         @$(MAKE_CMD) TARGET=x11 && ./rocksndiamonds --verbose
89
90 backup:
91         ./Scripts/make_backup.sh src
92
93 backup_lev:
94         ./Scripts/make_backup.sh lev
95
96 backup_gfx:
97         ./Scripts/make_backup.sh gfx
98
99 dist-unix:
100         ./Scripts/make_dist.sh unix .
101
102 dist-msdos:
103         ./Scripts/make_dist.sh dos .
104
105 dist-win32:
106         ./Scripts/make_dist.sh win .
107
108 dist-macosx:
109         ./Scripts/make_dist.sh mac . $(MAKE)
110
111 dist-clean:
112         @$(MAKE_CMD) dist-clean
113
114 dist-build-all:
115         $(MAKE) clean
116         @BUILD_DIST=TRUE $(MAKE) x11            ; $(MAKE) dist-clean
117         @BUILD_DIST=TRUE $(MAKE) cross-win32    ; $(MAKE) dist-clean
118         @BUILD_DIST=TRUE $(MAKE) cross-msdos    ; $(MAKE) dist-clean
119
120 dist-all: dist-build-all dist-unix dist-msdos dist-win32 dist-macosx
121
122 depend dep:
123         $(MAKE_CMD) depend