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
20 NEWD=$(PACKAGENAME)-$(VERSION)
22 OPTIONS=-DVERSION=\"$(VERSION)\"
25 SOUNDLIBRARIES=-lSDL_mixer
27 LIBRARIES=`sdl-config --libs` -lSDL_image $(SOUNDLIBRARIES)
30 INSTALL_PROGRAM = $(INSTALL) -o games -g games
31 INSTALL_DATA = $(INSTALL) -m 644
33 DATA_PREFIX = /usr/share/vor
34 PROGRAM_PREFIX = /usr/games/bin
39 cc -c -g $? `sdl-config --cflags` $(OPTIONS)
41 vor: SFont.o $(SOUNDSOURCE).o main.o
42 cc -o $@ $+ $(LIBRARIES)
48 if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi
49 if [ ! -d $(DATA_PREFIX)/banners ]; then mkdir $(DATA_PREFIX)/banners; fi
50 if [ ! -d $(DATA_PREFIX)/fonts ]; then mkdir $(DATA_PREFIX)/fonts; fi
51 if [ ! -d $(DATA_PREFIX)/icons ]; then mkdir $(DATA_PREFIX)/icons; fi
52 if [ ! -d $(DATA_PREFIX)/indicators ]; then mkdir $(DATA_PREFIX)/indicators; fi
53 if [ ! -d $(DATA_PREFIX)/music ]; then mkdir $(DATA_PREFIX)/music; fi
54 if [ ! -d $(DATA_PREFIX)/sounds ]; then mkdir $(DATA_PREFIX)/sounds; fi
55 if [ ! -d $(DATA_PREFIX)/sprites ]; then mkdir $(DATA_PREFIX)/sprites; fi
57 $(INSTALL_PROGRAM) ./vor $(PROGRAM_PREFIX)
58 $(INSTALL_DATA) ./data/banners/* $(DATA_PREFIX)/banners/
59 $(INSTALL_DATA) ./data/fonts/* $(DATA_PREFIX)/fonts/
60 $(INSTALL_DATA) ./data/icons/* $(DATA_PREFIX)/icons/
61 $(INSTALL_DATA) ./data/indicators/* $(DATA_PREFIX)/indicators/
62 $(INSTALL_DATA) ./data/music/* $(DATA_PREFIX)/music/
63 $(INSTALL_DATA) ./data/sounds/* $(DATA_PREFIX)/sounds/
64 $(INSTALL_DATA) ./data/sprites/* $(DATA_PREFIX)/sprites/
65 touch $(DATA_PREFIX)/.highscore
66 chmod a+rw $(DATA_PREFIX)/.highscore
69 rm -f $(PROGRAM_PREFIX)/vor
70 rm -f $(DATA_PREFIX)/banners/*
71 rm -f $(DATA_PREFIX)/fonts/*
72 rm -f $(DATA_PREFIX)/icons/*
73 rm -f $(DATA_PREFIX)/indicators/*
74 rm -f $(DATA_PREFIX)/music/*
75 rm -f $(DATA_PREFIX)/sounds/*
76 rm -f $(DATA_PREFIX)/sprites/*
77 rm -f $(DATA_PREFIX)/.highscore
79 if [ -d $(DATA_PREFIX)/banners ]; then rmdir $(DATA_PREFIX)/banners; fi
80 if [ -d $(DATA_PREFIX)/fonts ]; then rmdir $(DATA_PREFIX)/fonts; fi
81 if [ -d $(DATA_PREFIX)/icons ]; then rmdir $(DATA_PREFIX)/icons; fi
82 if [ -d $(DATA_PREFIX)/indicators ]; then rmdir $(DATA_PREFIX)/indicators; fi
83 if [ -d $(DATA_PREFIX)/music ]; then rmdir $(DATA_PREFIX)/music; fi
84 if [ -d $(DATA_PREFIX)/sounds ]; then rmdir $(DATA_PREFIX)/sounds; fi
85 if [ -d $(DATA_PREFIX)/sprites ]; then rmdir $(DATA_PREFIX)/sprites; fi
86 if [ -d $(DATA_PREFIX) ]; then rmdir $(DATA_PREFIX); fi