1 # Rock Dodger! Avoid the rocks as long as you can!
2 # Copyright (C) 2001 Paul Holt <pad@pcholt.com>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 debug := $(if $(DEBUG),1,0)
19 ldflags := $(shell sdl-config --libs) -lSDL_image -lSDL_mixer
20 cflags := $(shell sdl-config --cflags) -Wall -DDEBUG=$(debug)
22 my_objects := file.o score.o sound.o main.o $(if $(DEBUG),debug.o)
24 objects := $(libs) $(my_objects)
27 INSTALL_PROGRAM = $(INSTALL) -o games -g games
28 INSTALL_DATA = $(INSTALL) -m 644
30 DATA_PREFIX = /usr/share/vor
31 PROGRAM_PREFIX = /usr/games/bin
36 $(CC) $(cflags) -c -o $@ $<
38 $(my_objects): config.h
43 $(CC) $(ldflags) -o $@ $^ $(LIBRARIES)
49 if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi
50 if [ ! -d $(DATA_PREFIX)/banners ]; then mkdir $(DATA_PREFIX)/banners; fi
51 if [ ! -d $(DATA_PREFIX)/fonts ]; then mkdir $(DATA_PREFIX)/fonts; fi
52 if [ ! -d $(DATA_PREFIX)/icons ]; then mkdir $(DATA_PREFIX)/icons; fi
53 if [ ! -d $(DATA_PREFIX)/indicators ]; then mkdir $(DATA_PREFIX)/indicators; fi
54 if [ ! -d $(DATA_PREFIX)/music ]; then mkdir $(DATA_PREFIX)/music; fi
55 if [ ! -d $(DATA_PREFIX)/sounds ]; then mkdir $(DATA_PREFIX)/sounds; fi
56 if [ ! -d $(DATA_PREFIX)/sprites ]; then mkdir $(DATA_PREFIX)/sprites; fi
58 $(INSTALL_PROGRAM) ./vor $(PROGRAM_PREFIX)
59 $(INSTALL_DATA) ./data/banners/* $(DATA_PREFIX)/banners/
60 $(INSTALL_DATA) ./data/fonts/* $(DATA_PREFIX)/fonts/
61 $(INSTALL_DATA) ./data/icons/* $(DATA_PREFIX)/icons/
62 $(INSTALL_DATA) ./data/indicators/* $(DATA_PREFIX)/indicators/
63 $(INSTALL_DATA) ./data/music/* $(DATA_PREFIX)/music/
64 $(INSTALL_DATA) ./data/sounds/* $(DATA_PREFIX)/sounds/
65 $(INSTALL_DATA) ./data/sprites/* $(DATA_PREFIX)/sprites/
66 touch $(DATA_PREFIX)/scores
67 chmod a+rw $(DATA_PREFIX)/scores
70 rm -f $(PROGRAM_PREFIX)/vor
71 rm -f $(DATA_PREFIX)/banners/*
72 rm -f $(DATA_PREFIX)/fonts/*
73 rm -f $(DATA_PREFIX)/icons/*
74 rm -f $(DATA_PREFIX)/indicators/*
75 rm -f $(DATA_PREFIX)/music/*
76 rm -f $(DATA_PREFIX)/sounds/*
77 rm -f $(DATA_PREFIX)/sprites/*
78 rm -f $(DATA_PREFIX)/scores $(DATA_PREFIX)/.highscore
80 if [ -d $(DATA_PREFIX)/banners ]; then rmdir $(DATA_PREFIX)/banners; fi
81 if [ -d $(DATA_PREFIX)/fonts ]; then rmdir $(DATA_PREFIX)/fonts; fi
82 if [ -d $(DATA_PREFIX)/icons ]; then rmdir $(DATA_PREFIX)/icons; fi
83 if [ -d $(DATA_PREFIX)/indicators ]; then rmdir $(DATA_PREFIX)/indicators; fi
84 if [ -d $(DATA_PREFIX)/music ]; then rmdir $(DATA_PREFIX)/music; fi
85 if [ -d $(DATA_PREFIX)/sounds ]; then rmdir $(DATA_PREFIX)/sounds; fi
86 if [ -d $(DATA_PREFIX)/sprites ]; then rmdir $(DATA_PREFIX)/sprites; fi
87 if [ -d $(DATA_PREFIX) ]; then rmdir $(DATA_PREFIX); fi