File: Makefile

package info (click to toggle)
tuxpuck 0.8.2-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 880 kB
  • sloc: ansic: 3,317; makefile: 108
file content (58 lines) | stat: -rw-r--r-- 1,667 bytes parent folder | download | duplicates (5)
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
# Makefile for TuxPuck , Copyright Jacob Kroon 2001-2002
NAME		= tuxpuck
VERSION		= 0.8.2
CC		= gcc
CFLAGS		+= -D_VERSION=\"$(VERSION)\" -g -Wall
CSOURCES	= tuxpuck.c video.c audio.c menu.c sprite.c font.c timer.c \
		  board.c entity.c glass.c scoreboard.c player.c zoom.c png.c \
		  jpg.c intro.c tux.c arcana.c 
INCLUDES	= tuxpuck.h video.h audio.h font.h
	   	  

#############################################################

OBJS=$(CSOURCES:.c=.o)
ifdef COMSPEC
  OBJS += w32icon.o
endif

%.o	: %.c
	$(CC) $(CFLAGS) $(CPPFLAGS) `sdl-config --cflags` -c -o $@ $<

$(NAME) : $(OBJS)
	cd data; $(MAKE)
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
	-ljpeg -lvorbisfile -o $(NAME)

w32icon.o : data/icons/tuxpuck.ico
	echo AppIcon ICON "data/icons/tuxpuck.ico" > temp.rc
	windres -i temp.rc -o w32icon.o
	rm temp.rc

clean :
	cd utils; $(MAKE) clean;
	cd data; $(MAKE) clean;
	rm -f *~ $(OBJS) $(NAME)

indent :
	cd utils; $(MAKE) indent;
	indent -br -brs -sob -ce -c50 -npsl -npcs $(CSOURCES) $(INCLUDES)
	rm -f *~

dist :
	$(MAKE) clean
	mkdir $(NAME)-$(VERSION)
	cp $(CSOURCES) $(INCLUDES) readme.txt todo.txt bugs.txt thanks.txt \
	  COPYING Makefile $(NAME)-$(VERSION)
	cp -R man utils data $(NAME)-$(VERSION)
	tar -cf $(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
	tar -f $(NAME)-$(VERSION).tar --delete \
	  `tar -tf $(NAME)-*.tar | grep -w -e ".svn/"`
	gzip -9 $(NAME)-$(VERSION).tar
	rm -Rf $(NAME)-$(VERSION)

install : $(NAME)
	install -d $(DESTDIR)/usr/games
	install -d $(DESTDIR)/usr/share/man/man6
	install -m755 $(NAME) $(DESTDIR)/usr/games
	install -m644 man/$(NAME).6.gz $(DESTDIR)/usr/share/man/man6