File: Makefile

package info (click to toggle)
rockdodger 0.6.0a-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 788 kB
  • ctags: 283
  • sloc: ansic: 1,870; makefile: 80; sh: 8
file content (60 lines) | stat: -rw-r--r-- 2,012 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#   Rock Dodger! Avoid the rocks as long as you can!
#   Copyright (C) 2001  Paul Holt <pad@pcholt.com>

#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.

#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.

#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

VERSION=0.6.0a-debian
PACKAGENAME=rockdodger
NEWD=$(PACKAGENAME)-$(VERSION)
TMP=/tmp
OPTIONS=-DVERSION=\"$(VERSION)\" -DCOMPILEDATE=\"18/11/02\"
SOUNDSOURCE=sound
EXENAME=rockdodger

override CFLAGS += -Wall `sdl-config --cflags` $(OPTIONS)
LDFLAGS	=

#SOUNDLIBRARIES=-lvorbisfile -lvorbis -logg
#SOUNDLIBRARIES=
SOUNDLIBRARIES=-lSDL_mixer

LIBRARIES=-lSDL_image $(SOUNDLIBRARIES) `sdl-config --libs`

all:	$(EXENAME)

$(EXENAME):	SFont.o $(SOUNDSOURCE).o main.o
	$(CC) $(LDFLAGS) -o $(EXENAME) $+ $(LIBRARIES)

clean:
	rm -f *.o $(EXENAME)

package: $(EXENAME)
	mkdir -p $(TMP)/$(NEWD)/data
	cp *.c *.h Makefile COPYING *.xpm $(TMP)/$(NEWD)
	cp data/*.{png,bmp,wav,mod} $(TMP)/$(NEWD)/data
	( cd $(TMP);  tar zcf $(NEWD).tar.gz $(NEWD) )
	rm -rf $(TMP)/$(NEWD)
	mv $(TMP)/$(NEWD).tar.gz .

install:	all
	# rhk made the point the next line must be a copy, in case /usr/games is on a different partition
	cp $(EXENAME) /usr/games
	mkdir -p /usr/share/rockdodger/data
	cp data/*.{bmp,png,wav,mod} /usr/share/rockdodger/data
	chmod a+r /usr/share/rockdodger/data/*
	chmod a+r /usr/share/rockdodger/data
	touch /usr/share/rockdodger/.highscore
	chmod a+rw /usr/share/rockdodger/.highscore