aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 3fd812fd2a987699bf4ff5ff6a23b1c15b6a20d6 (plain)
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
CC	 = gcc -W -Wall
OPTFLAGS = -O -g
INCLUDE  = -I/usr/include/SDL
CFLAGS	 = $(OPTFLAGS) $(INCLUDE)
LDFLAGS  =
LIBS     = -lSDL -lpthread

ALL	= grv grvscored

OBJS	 = grv.o drawlevel.o play.o action.o bullets.o mystery.o utils.o \
	   keyboard.o graphics.o grvfont.o random.o

SCORED   = grvscored.o scoretbl.o

.SUFFIXES: .c .o .i .s

all: $(ALL)

grv: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

grvscored: $(SCORED)
	$(CC) $(LDFLAGS) -o $@ $(SCORED)

.c.o:
	$(CC) $(CFLAGS) -c -o $@ $<

.c.i:
	$(CC) $(CFLAGS) -E -o $@ $<

.c.s:
	$(CC) $(CFLAGS) -S -o $@ $<

grvfont.c: grvfont.psf psftoc.pl
	$(PERL) psftoc.pl < $< > $@ || rm -f $@

clean:
	rm -f *.o *.i *.s $(ALL)