File: Makefile

package info (click to toggle)
pgn-extract 16.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 912 kB
  • ctags: 737
  • sloc: ansic: 8,857; makefile: 103
file content (117 lines) | stat: -rw-r--r-- 4,066 bytes parent folder | download
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Make file for the pgn-extract program.
#    Program: pgn-extract: a Portable Game Notation (PGN) extractor.
#    Copyright (C) 1994-2005 David Barnes
#    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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#    David Barnes may be contacted as D.J.Barnes@kent.ac.uk
#    http://www.cs.kent.ac.uk/people/staff/djb/

OBJS=grammar.o lex.o map.o decode.o moves.o lists.o apply.o output.o eco.o\
	lines.o end.o main.o hashing.o argsfile.o mymalloc.o
DEBUGINFO=-g

# These flags are particularly severe on checking warnings.
# It may be that they are not all appropriate to your environment.
# For instance, not all environments have prototypes available for
# the standard library functions.

# Linux users might need to add -D__linux__ to these in order to
# use strcasecmp instead of strcmpi (cf output.c)

# Mac OS X users might need to add  -D__unix__ to CFLAGS
# and use CC=cc

CFLAGS+=-c -pedantic -Wall -Wshadow -Wformat -Wpointer-arith \
	-Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings $(DEBUGINFO)\
	-I/usr/local/lib/ansi-include
CC=gcc

# AIX 3.2 Users might like to use these alternatives for CFLAGS and CC.
# Thanks to Erol Basturk for providing them.
AIX_CFLAGS=-c -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ALL_SOURCE
AIX_CC=xlc

# Suppress auto extraction.
.SCCS_GET:

pgn-extract : $(OBJS)
	$(CC) $(DEBUGINFO) $(OBJS) -o pgn-extract

purify : $(OBJS)
	purify $(CC) $(DEBUGINFO) $(OBJS) -o pgn-extract

clean:
	rm -f core pgn-extract *.o

mymalloc.o : mymalloc.c mymalloc.h
	$(CC) $(CFLAGS) mymalloc.c

apply.o :  apply.c defs.h lex.h grammar.h typedef.h map.h bool.h apply.h taglist.h\
	   eco.h decode.h moves.h hashing.h mymalloc.h output.h
	$(CC) $(CFLAGS) apply.c

argsfile.o : argsfile.c argsfile.h bool.h defs.h typedef.h lines.h \
		taglist.h tokens.h lex.h moves.h eco.h apply.h output.h \
		lists.h
	$(CC) $(CFLAGS) argsfile.c

decode.o : decode.c defs.h typedef.h taglist.h lex.h bool.h decode.h lists.h \
            tokens.h mymalloc.h
	$(CC) $(CFLAGS) decode.c

eco.o :  eco.c defs.h lex.h typedef.h map.h bool.h eco.h taglist.h apply.h \
           mymalloc.h
	$(CC) $(CFLAGS) eco.c

end.o : end.c end.h bool.h defs.h typedef.h lines.h tokens.h lex.h mymalloc.h
	$(CC) $(CFLAGS) end.c

grammar.o : grammar.c bool.h defs.h typedef.h lex.h taglist.h map.h lists.h\
	    moves.h apply.h output.h tokens.h eco.h end.h grammar.h hashing.h \
	    mymalloc.h
	$(CC) $(CFLAGS) grammar.c

hashing.o : hashing.c hashing.h bool.h defs.h typedef.h tokens.h\
		taglist.h lex.h mymalloc.h
	$(CC) $(CFLAGS) hashing.c

lex.o : lex.c bool.h defs.h typedef.h tokens.h taglist.h map.h\
	lists.h decode.h moves.h lines.h grammar.h mymalloc.h apply.h\
	output.h
	$(CC) $(CFLAGS) lex.c

lines.o : lines.c bool.h lines.h mymalloc.h
	$(CC) $(CFLAGS) lines.c

lists.o :  lists.c lists.h taglist.h bool.h defs.h typedef.h mymalloc.h
	$(CC) $(CFLAGS) lists.c

main.o : main.c bool.h defs.h typedef.h tokens.h taglist.h lex.h moves.h\
	   map.h lists.h output.h end.h grammar.h hashing.h \
	   argsfile.h mymalloc.h
	$(CC) $(CFLAGS) main.c

map.o :  map.c defs.h lex.h typedef.h map.h bool.h decode.h taglist.h \
         mymalloc.h
	$(CC) $(CFLAGS) map.c

moves.o :  moves.c defs.h typedef.h lex.h bool.h map.h lists.h moves.h apply.h\
	   lines.h taglist.h mymalloc.h
	$(CC) $(CFLAGS) moves.c

output.o :  output.c output.h taglist.h bool.h typedef.h defs.h lex.h grammar.h\
	    apply.h
	$(CC) $(CFLAGS) output.c