updated GPL headers in source code
[dribble.git] / Makefile
blob61b18e9c1006bdd99a320eda5c0cdbf9c225c190
1 # dribble - a football manager game
2 # Copyright (C) 2008 Jonas Sandberg
4 # This file is part of dribble.
6 # dribble is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # dribble is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with dribble. If not, see <http://www.gnu.org/licenses/>.
19 DATADIR=\"/usr/share/dribble/\"
20 PROGNAME=dribble
21 OBJS=main.o country.o game.o cli.o player.o ref.o
22 CFLAGS=-Wall -pedantic-errors -Werror -Winline -ansi -DDATADIR=${DATADIR}
23 LDFLAGS=-lreadline
24 VALGRIND_FLAGS=-q --leak-check=full --leak-resolution=high
26 all: ${OBJS}
27 @echo " ld ${PROGNAME}"
28 @gcc ${LDFLAGS} ${OBJS} -o ${PROGNAME}
30 %.o: %.c
31 @echo " cc $<"
32 @gcc -c ${CFLAGS} $<
34 clean:
35 @rm -f *.o ${PROGNAME} *.test
37 lrt:
38 @rm -f *.o *.test
39 @echo test country.c
40 @gcc -o country.c.test -DFTEST_COUNTRY ${CFLAGS} country.c
41 @/usr/bin/valgrind ${VALGRIND_FLAGS} ${PWD}/country.c.test
42 @echo test player.c
43 @gcc -o player.c.test -DFTEST_PLAYER ${CFLAGS} player.c country.c
44 @/usr/bin/valgrind ${VALGRIND_FLAGS} ${PWD}/player.c.test
45 @echo test team.c
46 @gcc -o team.c.test -DFTEST_TEAM ${CFLAGS} team.c player.c country.c
47 @/usr/bin/valgrind ${VALGRIND_FLAGS} ${PWD}/team.c.test
48 @echo test division.c
49 @gcc -o division.c.test -DFTEST_DIVISION ${CFLAGS} division.c team.c player.c country.c
50 @/usr/bin/valgrind ${VALGRIND_FLAGS} ${PWD}/division.c.test
51 @echo test league.c
52 @gcc -o league.c.test -DFTEST_LEAGUE ${CFLAGS} league.c division.c team.c player.c country.c
53 @/usr/bin/valgrind ${VALGRIND_FLAGS} ${PWD}/league.c.test
54 @echo "OK"
55 @rm -f *.o ${PROGNAME} *.test